avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] avr-as and the dot "."


From: Christian Vogel
Subject: Re: [avr-gcc-list] avr-as and the dot "."
Date: Sun, 20 Apr 2003 14:24:55 +0200
User-agent: Mutt/1.2.5.1i

Hi Daniel,

On Sat, Apr 19, 2003 at 07:55:56PM -0400, Daniel Kruszyna wrote:
> $ cat test.s
> .word .
> .word .
> .word .

> and assembling it with:
> $ avr-as -a=list test.s

As others have already pointed out, the assembler cannot fill in
the address because it does not yet know where a possible following
link might put the generated code.

You can use avr-objdump to look at the relocation information,
just look at the following paragraph. There the relocation information
is printed as:
        2: R_AVR_16     .text+0x2
           ^--- type    ^--- address, put this two bytes in the .text segment

--- try this: ---
> address@hidden reloc_test] $ avr-as -o test.o test.s
> address@hidden reloc_test] $ avr-objdump -d -r test.o 
> 
> test.o:     file format elf32-avr
> 
> Disassembly of section .text:
> 
> 00000000 <.text>:
>    0: 00 00           nop
>                       0: R_AVR_16     .text
>    2: 00 00           nop
>                       2: R_AVR_16     .text+0x2
>       ...
>                       4: R_AVR_16     .text+0x4

        Chris

-- 
They say if you play the Windows CD backward, you can hear satanic words.
 - Oh, that´s nothing. If you play it forward it installs Windows.


reply via email to

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