git: be2da08e0b5b - stable/15 - nlist.3: Add discouraged use notice

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

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

commit be2da08e0b5b82329e36a6cf3b98f9099c6184ce
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:13:35 +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)
---
 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 876af0ab6bc1..7321c1e9215c 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 symbol table of an
 executable file (see