bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/26407] Global symbol reference breaks without -Bsymbolic-functio


From: address@hidden
Subject: [Bug ld/26407] Global symbol reference breaks without -Bsymbolic-functions
Date: Thu, 20 Aug 2020 11:37:46 +0000

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

--- Comment #6 from Fabian Vogt <fabian@ritter-vogt.de> ---
(In reply to H.J. Lu from comment #4)
> '--dynamic-list=DYNAMIC-LIST-FILE'
>      Specify the name of a dynamic list file to the linker.  This is
>      typically used when creating shared libraries to specify a list of
>      global symbols whose references shouldn't be bound to the
>      definition within the shared library, or creating dynamically
>      linked executables to specify a list of symbols which should be
>      added to the symbol table in the executable.  This option is only
>      meaningful on ELF platforms which support shared libraries.
> 
> So symbols aren't on the dynamic list will be bound to the definition
> within the shared library.  The linker behavior matches the linker
> manual.

That doesn't explain the behaviour change with -Bsymbolic-functions and the
different behaviour with gold.

The definition of the symbol is inside lib.so, so there is no reason this
shouldn't work.

This breaks because the break binary has a R_X86_64_COPY relocation, which
essentially moves the symbol out of the lib into the executable.

IMO copy relocations are an implementation detail which should be made as
compatible as possible, in this case maybe by making --dynamic-list-data the
default if --dynamic-list is passed.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]