Hi, Why do we specify in linker scripts the entry point using ENTRY(symbol) whe= n for example the ARM architecture always starts its reset code at address =
0x0000000?I have a snippet of a linker script as following (taken from barebox bootlo= ader sources)
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(exception_vectors) SECTIONS { . =3D TEXT_BASE; =20 PRE_IMAGE =20 . =3D ALIGN(4); .text : { _stext =3D .; _text =3D .; *(.text_entry*) ...
With the code for reset handler in .text_entry section:
void __naked __section(.text_entry) exception_vectors(void) { __asm__ __volatile__ ( "b reset\n" /* reset */ ...
Now, since TEXT_BASE is different from 0x00000000, how can reset be at loca= tion 0x00000000 where it is expected to be? (i.e. if TEXT_BASE is 0x8000000=
0, then reset is at 0x80000000 according to the linker script whereas the f= irst instruction to be executed by the CPU should be located at 0x00000000)= . Is there memory aliasing in this case or the ENTRY is used for this purpose= ?Thank you,
-- Carlo