This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Query] : Usage of single LO relocation
- From: Thiemo Seufer <ths at networkno dot de>
- To: Amarnath <amarnath at acmet dot com>
- Cc: 'BinutilsAtRedhat' <binutils at sources dot redhat dot com>
- Date: Fri, 21 Apr 2006 11:30:03 +0100
- Subject: Re: [Query] : Usage of single LO relocation
- References: <003801c6652b$ad7b0ec0$ad00a8c0@amarnath>
Amarnath wrote:
> As per my previous query results, I have observed that we should have HI
> relocation and LO relocation immediately following each other.
>
> With that as reference, a new query has been raised for me. Please check
> it.
>
> Query 1
> -------
> If we have multiple LO relocations emitted for a single HI relocation as
> following patterns, will the second LO relocation be utilized for any
> purpose by the GCC linker?
>
> Pattern
> -------
> R_MIPS_HI16
> R_MIPS_LO16
> R_MIPS_LO16 <-- Will linker utilize it for some relocations?
Yes, assuming all three refer to the same symbol, the last LO16 will
also use the data from the preceeding HI16. This is the GNU
extension to the original ABI requirement, IIRC there's some random
comment in the gas source which explains it a bit.
> Query 2
> -------
> As I have examined, I have not yet found any usage of LO relocation as a
> separate one. Can we have usage of LO relocation without HI relocation
> in any case?
No, since it can't find the the high part of the relocation then.
That's a limitation caused by the REL relocation format used for o32.
Thiemo