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

--- Comment #21 from Ali Bahrami <ali_swbugzilla at emvision dot com> ---
(In reply to Alan Modra from comment #20)
> OK, getting back to this.  I have some reservations about making the global
> ABI symbols SHN_ABS.  (I made the patch to demonstrate how it is done,
> that's all.)  The problem with SHN_ABS symbols holding addresses as is the
> case with all of these symbols, is that in a shared libary or PIE those
> symbols must be relocated by the base address of the library if they are
> used in dynamic relocations.  Which is wrong according to the ELF gABI:
> 
> SHN_ABS
>     The symbol has an absolute value that will not change because of
> relocation.
> 
> For that reason GNU binutils has moved away from making
> _GLOBAL_OFFSET_TABLE_ and similar symbols SHN_ABS on a number of targets.


I just noticed this, from a couple of days ago, sorry for
the delay. I may have missed something, but in case there's
a question, the Solaris ld doesn't use SHN_ABS for these symbols:

    % elfdump -sN.dynsym /lib/64/libc.so.1 | egrep
'GLOBAL|PROCED|DYNAM|_end|_fini|_init|_start'
         [86]  0x1352c0   0x2b  FUNC LOCL  H    0 .fini             _fini
         [89]  0x135290   0x26  FUNC LOCL  H    0 .init             _init
      [12813]  0x3c28f4      0  OBJT GLOB  D    0 .bss              _end
      [13395]    0x7590      0  OBJT GLOB  D    0 .dynamic          _DYNAMIC
      [13625]  0x134f08      0  OBJT GLOB  D    0 .plt             
_PROCEDURE_LINKAGE_TABLE_

I don't know how much using ABS would really break for our
linkers, but it does seem that these symbols should be
marked as data or functions as appropriate instead.

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

Reply via email to