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: [Query] : Usage of single LO relocation


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


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