This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Is it valid in GAS?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "Vineet Sharma, Noida" <vineets at noida dot hcltech dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 6 Dec 2003 12:13:48 +1030
- Subject: Re: Is it valid in GAS?
- References: <1B3885BC15C7024C845AAC78314766C501605B92@EXCH-01>
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