This is the mail archive of the
mailing list for the binutils project.
Re: relocation entries for absolute symbols
- From: Ian Lance Taylor <iant at google dot com>
- To: Amit Gud <agud at redhat dot com>
- Cc: binutils at sourceware dot org, bug-binutils at gnu dot org, Vivek Goyal <vgoyal at in dot ibm dot com>
- Date: 26 Jun 2006 15:20:53 -0700
- Subject: Re: relocation entries for absolute symbols
- References: <44A05DA5.firstname.lastname@example.org>
Amit Gud <email@example.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.