This is the mail archive of the binutils@sources.redhat.com 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: Is it valid in GAS?


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


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