This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to check if .data section is loaded properly in LMA
chandru1248 <chandru1248@gmail.com> writes:
>> Normally when you do this kind of thing, your startup code needs to copy
>> the data from the LMA to the VMA. See the last part of
>
> I have already written the code to copy the data from LMA to VMA. Problem
> here is that LMA itself does not have the initialized values. It contains
> the global varibles but all of them have the value 0. I am not sure if the
> LMA is corrupted or if it is properly loaded.
Ah, I see. I also do not know why that is not working. You said that
readelf shows that the section is at the correct address. You could use
objdump -s -j SECTIONNAME to check that the section has the right
contents. If those all look correct, then you will need to look at your
loader to see what it is doing and why it is not working as expected.
Ian