This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Fix linking of .gpdword on MIPS
On Tue, Feb 27, 2007 at 08:04:11AM -0800, Ian Lance Taylor wrote:
> There is always a definition of the symbol with index 0: it's an
> SHN_ABS symbol with value zero.
No, it's an SHN_UNDEF symbol.
> It's used for, e.g., R_*_RELATIVE
> relocations (which of course do not appear in .o files). The ELF spec
> defines precisely what a relocation against symbol 0 should mean, so I
> don't see any reason that such a relocation could not appear in a .o
> file. For a specific example, on the SH the R_SH_CODE, R_SH_DATA, and
> R_SH_COUNT relocs will normally use symbol index 0.
To clarify, the code in question is placed to be executed only for
full-word data relocations unless I botched a port, as it appears I
may have botched MIPS - things like ABS32, where a relocation against
an SHN_UNDEF symbol does not have a sensible meaning.
That was the plan, anyway.
--
Daniel Jacobowitz
CodeSourcery