This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: QUERY in relocation of ABSOLUTE SYMBOLS
- From: "Santosh" <santosh at acmet dot com>
- To: "'Nick Clifton'" <nickc at redhat dot com>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 24 Jul 2006 11:42:02 +0530
- Subject: RE: QUERY in relocation of ABSOLUTE SYMBOLS
- Reply-to: <santosh at acmet dot com>
> -----Original Message-----
> From: binutils-owner@sourceware.org
[mailto:binutils-owner@sourceware.org]
> On Behalf Of Nick Clifton
> Sent: Sunday, July 23, 2006 8:00 PM
> To: santosh@acmet.com
> Cc: binutils@sourceware.org
> Subject: Re: QUERY in relocation of ABSOLUTE SYMBOLS
>
> Hi Santosh,
>
> > I have a query in relocation for HI AND LO operators.
>
> You should mention which architecture(s) you are concerned about as
this
> may be important.
>
> > Assume that we know the address of ABSOLUTESYMBOL while assembling.
>
> > Addiu r3, HI ( ABSOLUTE SYMBOL )
> > ORI r2, LO ( ABSOLUTE SYMBOL )
> >
> > Its it better to emit relocation information for the above HI AND LO
or
> > to resolve in assembling itself
>
> If the ABI for the architecture says that you must emit the relocs for
> this situation then you must do it. Otherwise it is better not to
emit
> the relocs but resolve the expression in the assembler. This
simplifies
> the generated object file which means that it will be that little bit
> faster to link.
>
> Note - if the address for ABSOLUTESYMBOL is only for a weak definition
> then you must also emit the relocs. The weak definition might be
> overridden by another definition in another object file.
>
> Cheers
> Nick
I will check them as per your suggestion
Thank you
I Santhosh