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

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

[avr-gcc-list] Define assembly start location


From: Johannes Bauer
Subject: [avr-gcc-list] Define assembly start location
Date: Sun, 07 Nov 2004 16:28:08 +0100
User-agent: Mozilla Thunderbird 0.8 (X11/20040921)

Hi list,

I'm currently working with avr-gcc, which I use to directly
preprocess/assemble my assemly (.S) listings.

Now when working like this, avr-gcc always inserts the ".vectors"
section before any "real" code (i.e. the "main" function). However, I
want to directly assemble into the "vectors" table (i.e. exactly control
what's in there). So I tried:

.section .vectors
        ldi r16, 1
        ldi r16, 2
        ldi r16, 3
        ldi r16, 4

.text
.global main
.type   main, @function
; blahblahblah

This works _almost_. It just doesn't overwrite the existing ".vectors"
table, but appends to it:

00000000 <__vectors>:
   0:   07 c0           rjmp    .+14            ; 0x10
   2:   07 c0           rjmp    .+14            ; 0x12
   4:   06 c0           rjmp    .+12            ; 0x12
   6:   05 c0           rjmp    .+10            ; 0x12
   8:   01 e0           ldi     r16, 0x01       ; 1
   a:   02 e0           ldi     r16, 0x02       ; 2
   c:   03 e0           ldi     r16, 0x03       ; 3
   e:   04 e0           ldi     r16, 0x04       ; 4

How can I overwrite the ".vectors" section and start my assembly at
position 0x00?

Greetings,
Johannes


reply via email to

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