Is it valid in GAS?

Alan Modra amodra@bigpond.net.au
Sat Dec 6 01:43:00 GMT 2003


On Fri, Dec 05, 2003 at 04:05:29PM +0530, Vineet Sharma, Noida wrote:
> Hi,
>       Is the following declartion valid in GAS Assembler.
> 
> 	___DTOR_LIST:
>       		  .short 0x88
> 	Lp.1:
>       	  .short  ___DTOR_LIST - 5	/*Is negative i .e substraction
> allowed*/
> 
> 
> If yes, then how do i find this addended in tc_gen_reloc().

Yes, it is valid.  Please see how other targets do this.  For example,
powerpc-linux-gas produces

Relocation section '.rela.text' at offset 0x200 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000002  00000403 R_PPC_ADDR16      00000000   ___DTOR_LIST + fffffffb


-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list