Memory data is not the same as the binary

I have a project for an RX361 in GCC.

I upgraded the version of GCC from to

While checking how it works, I noticed that there is a line of code that is not being included during debug mode.

I take micro memory and the binary and are not equal.

When I load the binary only, the program works correctly.

The code part that is not being included is related to this section of the linker script:

/* .data: */



. = ALIGN(4);

_app_data_start = .;






_app_data_end = .;


Can someone help my?

  • From a single build, the binary should be the same code as what would be debugged in the ELF file.  The code can be dumped from the ELF file to confirm, but this is how the binary is typically generated.

    You reference missing code, but the linker section only covers data.  As part of the C-startup, the ROM image should be copied to RAM to provide the data initial values.  Is this what is missing?

  • Yes, that is the missing part. The thing is that when I go to load that part into RAM at startup, it doesn't exist in ROM. This does not copy well and the program does not work.

    I add photos so you can see the condition of what I'm commenting on.

    This is the .map

    De memory state when I debugging

    And the binary