]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
abilist.awk: Handle weak unversioned defined symbols
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Apr 2026 02:46:42 +0000 (10:46 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Apr 2026 04:27:09 +0000 (12:27 +0800)
After

commit f685e3953f9a38a41bbd0a597f9882870cee13d5
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 29 09:49:57 2025 +0800

    elf: Don't set its DT_VERSYM entry for unversioned symbol

ld no longer assigns version index 1 to unversioned defined symbol.
For libmachuser.so, "objdump --dynamic-syms" reports:

0000dd30  w   DF .text 000000f8              processor_start

instead of

0000dd30  w   DF .text 000000f8 (Base)       processor_start

Also allow NF == 6 for weak unversioned dynamic symbols.  This fixes BZ
33650.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
scripts/abilist.awk

index 6cc7af6ac8e1dd1d4cfb84f60949ee8f9b34ad33..7ea1edf8c09d8d1d1e76f973e1cf03638face37d 100644 (file)
@@ -38,7 +38,7 @@ $4 == "*UND*" { next }
 $2 == "l" { next }
 
 # If the target uses ST_OTHER, it will be output before the symbol name.
-$2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
+$2 == "g" || $2 == "w" && (NF == 6 || NF == 7 || NF == 8) {
   type = $3;
   size = $5;
   sub(/^0*/, "", size);