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

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

Re: [avr-gcc-list] section flags .data


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] section flags .data
Date: Sun, 24 Jul 2005 21:36:12 +0200 (MET DST)

Torsten Mohr <address@hidden> wrote:

> to have the data that belong into .data somewhere in flash makes
> sense, but the address of the section .data pointed to 0x800100.

That's the RAM address, where the offset 0x800000 is a hack to map the
different address spaces of the AVR into a single flat address space
for GCC.

> is correct, but also the address needs to be changed according to
> the mapping in the program header in the ELFs program header table.

No mapping needed.  Internally, everything is handled in terms of RAM
addresses.  In ROM, the initialization code knows that it has to
expect the RAM init data straight after the normal program code.  (It
knows that by some external symbol filled in by the linker.)  So as
long as your avr-objcopy command that extracts the ROM image from the
ELF file concatenates both .text and .data, it will work.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

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