git: 2ca9d9256fd4 - stable/14 - nlist.3: Add discouraged use notice

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Tue, 26 May 2026 17:16:57 UTC
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=2ca9d9256fd4524b17260053eb4570aa6ba4d1f1

commit 2ca9d9256fd4524b17260053eb4570aa6ba4d1f1
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-05-17 14:29:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-05-26 17:16:28 +0000

    nlist.3: Add discouraged use notice
    
    It is a relic from a.out days and is poorly specified. Although ELF
    support was added to nlist, there are better ways to access ELF data.
    
    Reviewed by:    kib
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D57078
    
    (cherry picked from commit 94b7a335683abcbcd76e8b67d37e21271d81590c)
    (cherry picked from commit be2da08e0b5b82329e36a6cf3b98f9099c6184ce)
---
 lib/libc/gen/nlist.3 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3
index e549843c5581..6aefd95e3b51 100644
--- a/lib/libc/gen/nlist.3
+++ b/lib/libc/gen/nlist.3
@@ -40,6 +40,10 @@
 .Sh DESCRIPTION
 The
 .Fn nlist
+function is provided for compatibility with legacy applications.
+Its use is discouraged.
+The
+.Fn nlist
 function
 retrieves name list entries from the
 .Xr elf 5