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: Shifting labels in constants


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


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