[arm-gnu] difference between values from readelf and GDB
Vaclav Peroutka
vaclavpe at seznam.cz
Mon Jun 11 14:01:16 UTC 2012
Hello,
I have simple linker script for Cortex M3 below. If I use arm-none-eabi-readelf, I can get correct values for _etext, _data, _edata. But if I run arm-none-eabi-gdb with this ELF, I see all values wrong. What is wrong here ?
Thank you in advance,
Vaclav
ENTRY(_start)
MEMORY {
FLASH (rx) : org = 0x70000000, len = 0x4000000
RAM (rwx) : org = 0x08000000, len = 0x40000
SDRAM (rwx) : org = 0x74000000, len = 0x4000000
}
SECTIONS {
.text : {
*(.vectors*) *(.text*) *(.rodata*);
. = ALIGN(4);
_etext = .;
} > FLASH
.data : {
_data = .;
*(.data*);
_edata = .;
} > RAM AT > FLASH
.bss : {
_bss = .;
*(.bss*) *(COMMON);
_ebss = .;
} > RAM
.heap :
{
. = ALIGN(32);
__start_heap__ = . ;
*(.heap)
. = ALIGN(32);
__end_heap__ = . ;
} >RAM
end = .;
/DISCARD/ : { *(.eh_frame*); }
}
PROVIDE(_stack = 0x08010000);
More information about the arm-gnu
mailing list