[Top][All Lists]

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

Re: [avr-gcc-list] forcing address

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] forcing address
Date: Mon, 19 Aug 2002 14:08:56 +0200 (MET DST)

Marlin Unruh <address@hidden> wrote:

> I am writing an assembly file to include some time, and sequence
> sensitive code. I have a lookup table that I defined in the .s
> file. I cannot get the compiler to place the lookup table at a given
> location.

Sure.  This is a linker issue, and usually, in an environment that
uses compilation that results in relocatable object files, you cannot
arbitrarily place your code at predetermined locations.  This is only
possible when using absolute assembly.  (Even in the old days of the
Z80, it was common to use relocatable assembly, and have the linker
put all the pieces into place.)

Using linker directives, you can tell the linker at which address to
place the beginning of your program.

How else would you expect the whole thing to work?  Say, you want some
particular piece of code at address 0x100, but the startup code starts
at 0x0.  How should the compiler be told that there are some XXX bytes
free between the startup code and your code at 0x100 (that could be
filled by the compiler)?

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org

reply via email to

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