[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] avr-as: .byte SYMA - SYMB?

From: Dmitry K.
Subject: Re: [avr-gcc-list] avr-as: .byte SYMA - SYMB?
Date: Wed, 28 May 2003 09:08:37 +1100
User-agent: KMail/1.5

        .byte  SYMA-SYMB
        .align 1
work OK with binutils-030428 .
Perhaps, problem was: odd address after .byte .

Best wishes.

27 May 2003 20:19 Joerg Wunsch:
> (I figure avr-as is not fully on-topic, but since the developers of
> avr-gcc and avr-as are identical, i'd rather post that here than on
> avr-chat.)
> I tried to define a byte in avr-as to the difference of two
> (relocatable) symbols.  I pulled my hair out, but failed so far.
> So something like:
> .text
> SYMA: mov     rthis, rthat
> SYMB: ldi     rthat, 42
> ...
>       .byte   SYMA-SYMB
> This should be possible, since the difference of two relocatable
> symbols is an absolute value by itself.  It's even an absolute value
> that can be computed by the assembler in that case (as opposed to one
> that is only known at link time).
> I always get an "illegal relocation size: 1" message.
> Just-shoot-around-without-knowing-what-i'm-doing attempts to use lo8()
> or pm() only add "garbage at end of line" messages to this.
> Using
>       .word   SYMA-SYMB
> however does work (and yields the expected result).
> I see that message comes from avr_cons_fix_new() in
> gas/config/tc-avr.c, but the constraints of what could be handled in
> this function are unintelligible to me at the first glance.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]