"Jeffi Edward.J" <j.jeffi@xxxxxxxxxxx> writes: > Ian Lance Taylor-3 wrote: >> >> "Jeffi Edward.J" <j.jeffi@xxxxxxxxxxx> 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, > .etc. > > 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 > section. Thanks. You didn't really explain what you mean by "start address." I don't understand what is actually going wrong. In ELF, the LMA is reflected in the p_paddr field of the segments. Perhaps you could show use the readelf -l output of your executable and tell us which values you want to be different. Ian