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 23:37:05 +0930
- Subject: Re: Shifting labels in constants
- References: <1021036600.4744.24.camel@stdiego.d4a.com>
On Fri, May 10, 2002 at 04:16:40PM +0300, Raul Hudea wrote:
> Thanks for your answer,
>
> But even if I replace .text with .absolute in the small program that I
> wrote, I get the same error.
".section .absolute" just creates a new section which happens to be
called .absolute. It's got nothing to do with absolute symbols,
which you create using .equ or `=', eg.
foo = 1234
> I am a little puzzled because if I have
> .long (.L2 + 1) it works, but if I use
> .long (.L2 >> 1) it does not work.
> To me the two expressions look like arithmetic expressions, but one
> works and the other don't.
Symbol +/- constant can be respresented as a relocation in the object
file, symbol >> 1 can't. It's as simple as that.
--
Alan Modra
IBM OzLabs - Linux Technology Centre