https://sourceware.org/bugzilla/show_bug.cgi?id=33577
--- Comment #22 from H.J. Lu <hjl.tools at gmail dot com> ---
Unversioned symbols apply to both defined and undefined. The new behavior:
[hjl@gnu-tgl-3 pr33577]$ cat x.c
#include <stdio.h>
extern void show_undef_weak (void) __attribute__((weak));
extern void show_undef (void);
void
foo (void)
{
show_undef_weak ();
show_undef ();
printf ("hello\n");
}
[hjl@gnu-tgl-3 pr33577]$ gcc -fPIC -shared -o libx.so x.c
[hjl@gnu-tgl-3 pr33577]$ objdump -T libx.so
libx.so: file format elf64-x86-64
DYNAMIC SYMBOL TABLE:
0000000000000000 w D *UND* 0000000000000000
_ITM_deregisterTMCloneTable
0000000000000000 D *UND* 0000000000000000 show_undef
0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.2.5) puts
0000000000000000 w D *UND* 0000000000000000 __gmon_start__
0000000000000000 w D *UND* 0000000000000000 show_undef_weak
0000000000000000 w D *UND* 0000000000000000
_ITM_registerTMCloneTable
0000000000000000 w DF *UND* 0000000000000000 (GLIBC_2.2.5) __cxa_finalize
00000000000003b9 g DF .text 0000000000000020 foo
[hjl@gnu-tgl-3 pr33577]$
Both unversioned defined and undefined symbols no longer have the BASE version.
Neither ld nor glibc ld.so use VER_NDX_LOCAL for symbol visibility.
--
You are receiving this mail because:
You are on the CC list for the bug.