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

--- Comment #2 from Alan Modra <amodra at gmail dot com> ---
> .sizeof. (__verbose) in shared object gets the size of __verbose
> in executable.

No, that isn't true.  The value is the size of __verbose in the shared library
plus the base of the shared library.

> Relocation against .sizeof.__verbose is very special.  It is handled
> incorrectly in shared object.

Yes, and this is a general bug in the way absolute symbols are handled.  They
shouldn't be relocated at runtime but we do that for historical reasons. 
Symbols like __GLOBAL_OFFSET_TABLE__ used to be made SHN_ABS but they are
obviously relative to the base of the shared library.  Similarly, user defined
symbols in linker scripts might be absolute but the user really want them to be
relative to the base of the shared library.  We could fix the way absolute
symbols behave at the risk of breaking (possibly a lot) of user code.

32253bb79 is a separate issue.  I wrongly put "wanted the size of" when I meant
"wanted the symbols for" in the log.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to