This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Shifting labels in constants
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Raul Hudea <rhudea at develop4all dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 10 May 2002 22:15:19 +0930
- Subject: Re: Shifting labels in constants
- References: <1021026607.4743.7.camel@stdiego.d4a.com>
On Fri, May 10, 2002 at 01:30:07PM +0300, Raul Hudea wrote:
> .section .text
> .align 16
> .L1:
> .long ((.L2) >> 1 )
> .L2:
> nop
>
> but I keep getting the following error:
> Error: invalid section for operation
The error message could be improved. You're asking the assembler
to generate a relocatable object file containing information (a
relocation) that says you want a the value of some offset in the
.text section shifted right once. Typical object formats can't
represent such expressions. You can only use the shift right
operator on symbols from the absolute section (that's what the
error message is saying) or expressions that resolve to a number.
--
Alan Modra
IBM OzLabs - Linux Technology Centre