This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
question about ld and the 'AT' statement
- From: <heinricg at esiee dot fr>
- To: binutils at sources dot redhat dot com
- Date: Mon, 15 Mar 2004 10:26:05 +0100
- Subject: question about ld and the 'AT' statement
Hi all,
I am developing an application for an embedded target and I need to
place my initialised data in ROM. Therefore, I have a script that
looks like:
OUTPUT_FORMAT(elf32-littlearm)
MEMORY
{
rom : ORIGIN = 0x10000, LENGTH = 0x28000
ram : ORIGIN = 0xD0000, LENGTH = 0x1A00
}
SECTIONS
{
.text :
{
__text_start = .; *(.text) *(.strings) __text_end = .;
} > rom
.init : AT (__text_end)
{
__data_start = .; *(.data) __data_end = .;
} > ram
.bss ALIGN (0x4) :
{ [...] }
[...]
}
when I use the "objdump -D" command on my object file, I can see that
my initialised data appear at addresses from 0xd0018 (i.e. in RAM). I
would have thought that they would be located after the _text segment,
unless objddump displays the relocation addresses rather than the load
addresses.
Is that normal or I am missing something?
Thanks,
Greg.