git: 94b7a335683a - main - nlist.3: Add discouraged use notice

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 18 May 2026 23:57:43 UTC
The branch main has been updated by emaste:

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

commit 94b7a335683abcbcd76e8b67d37e21271d81590c
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-05-17 14:29:29 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-05-18 23:56:00 +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
---
 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 d6029153de5a..9e2aa0d7eb0f 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