This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: relocation entries for absolute symbols


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]