https://sourceware.org/bugzilla/show_bug.cgi?id=33577

--- Comment #49 from Michael Matz <matz at suse dot de> ---
(In reply to Ali Bahrami from comment #43)

>     % cc hello.c
>     % elfdump -v a.out
> 
>     Symbol Table Section:  .dynsym
>       index      value size  type bind oth ver shndx    name
>        [11]  0x8050b60 0x2f  FUNC GLOB  D    1 .text    main

In the current git of GNU ld, all the above exported symbols (we have to use
-E here to export globals from executables) are now VER_NDX_LOCAL:

Symbol table '.dynsym' contains 12 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
...
    11: 0000000000401136    50 FUNC    GLOBAL DEFAULT   13 main
...
Version symbols section '.gnu.version' contains 12 entries:
 Addr: 0x00000000004005be  Offset: 0x000005be  Link: 5 (.dynsym)
  000:   0 (*local*)       2 (GLIBC_2.34)    3 (GLIBC_2.2.5)   0 (*local*)    
  004:   0 (*local*)       0 (*local*)       0 (*local*)       0 (*local*)    
  008:   0 (*local*)       0 (*local*)       0 (*local*)       0 (*local*)    

> As long as versioning is in play, global definitions that
> are not otherwise directed to a different version via a
> mapfile/linker-script, end up in version 1.

Agreed.  However that's not what the current git implementation of the fix
for the initially reported problem here does.  It _always_ uses NDX_LOCAL
for everything not versioned, undefined or defined, independend of symbols
binding.

I think there should have been no change whatsoever for defined symbols.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to