Bug 266355

Summary: elftoolchain nm(1) doesn't support versioned symbols
Product: Base System Reporter: Xin LI <delphij>
Component: binAssignee: Ed Maste <emaste>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Xin LI freebsd_committer freebsd_triage 2022-09-11 06:23:56 UTC
(also reported upstream at https://sourceforge.net/p/elftoolchain/tickets/612/ ).

elftoolchain's nm(1) doesn't seem to support versioned symbols like binutils's nm(1):

binutils:

$ /usr/local/bin/nm -D /bin/sync
                 w _Jv_RegisterClasses
                 w __cxa_finalize@FBSD_1.0
0000000000003c48 D __progname
                 U _init_tls@FBSD_1.0
                 U atexit@FBSD_1.0
0000000000003ca0 B environ
                 U exit@FBSD_1.0
                 U sync@FBSD_1.0
elftoolchain:

                 w _Jv_RegisterClasses
                 w __cxa_finalize
0000000000003c48 D __progname
                 U _init_tls
                 U atexit
0000000000003ca0 B environ
                 U exit
                 U sync
readelf(1) however, do support versioned symbols.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2022-12-14 14:05:33 UTC
FWIW llvm-nm does:

$ llvm-nm -D /bin/sync
                 w _Jv_RegisterClasses
                 w __cxa_finalize@FBSD_1.0
0000000000003c48 D __progname
                 U _init_tls@FBSD_1.0
                 U atexit@FBSD_1.0
0000000000003ca0 B environ
                 U exit@FBSD_1.0
                 U sync@FBSD_1.0