This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to split memory in linker script to get the lower address as start of .text?

Ian Lance Taylor-3 wrote:
> "Jeffi Edward.J" <> writes:
>> I'm supposed to get the start address of image as 0x8450020 (start of LMA
>> of
>> .data) and the end address of image as the value of image_end symbol.
>> But I get the start address of image as VMA of .data (i.e the value of
>> symbol ram_data_start), which is wrong.
> What do you mean by "the start address?"  What object file format are
> you using?
> Ian

Am using ELF object file format.
In my understanding, the image contains the .text, .rodata, etc..and the
initialized data section .data, .sdata etc. It doesn't contain .bss, .sbss,

So by the word "image" i mean the combination of code as well as initialized
data section.
Here in this example, my initialized data (LMA of .data ) begins at the
address 0x8450020. The code segment follows this address space. So my image
contains the address space ranging from 0x8450020 till the end of .text

View this message in context:
Sent from the gcc - Help mailing list archive at

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]