relocation entries for absolute symbols
Ian Lance Taylor
iant@google.com
Tue Jun 27 07:29:00 GMT 2006
Amit Gud <agud@redhat.com> writes:
> I'm compiling the GNU/Linux kernel as a shared library and I've found
> that relocation entries are created even for absolute symbols. Is
> there any work-around for this, or is it a known bug?
That is correct behaviour if the symbol is globally visible. In a
shared library, by default, any symbol may be overridden by the main
executable. That means that a relocation entry is required.
One fix would be to force the symbol to be hidden using an attribute
or a linker script.
Ian
More information about the Binutils
mailing list