This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Why are there 2 continous R_MIPS_HI16 reloc entries in the ELF excutable?
- From: Thiemo Seufer <ths at networkno dot de>
- To: Pan ruochen <panruochen at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 13 Aug 2008 12:21:02 +0200
- Subject: Re: Why are there 2 continous R_MIPS_HI16 reloc entries in the ELF excutable?
- References: <af0faace0808130252x423d7a90h48f0a947b5e8600c@mail.gmail.com>
Pan ruochen wrote:
> Hi All,
>
> $mips-elf-readelf -r foo.out
> Offset Info Type Sym.Value Sym. Name
> 00000328 00009005 R_MIPS_HI16 0000004c write_buf
> 0000033c 00009005 R_MIPS_HI16 0000004c write_buf
>
> But the spec says:
> |--------------------------------------------------------------------------|
> | Each relocation type of R_MIPS_HI16 must have an associated |
> | R_MIPS_LO16 entry immediately following it in the list of relocations. |
> |--------------------------------------------------------------------------|
>
> What's wrong about it?
The GNU toolchain allows relaxed rules of R_MIPS_HI16/R_MIPS_LO16
as an extension. (This allows some optimizations which wouldn't be
possible otherwise.)
Thiemo