arm: Adjust entry point of XIP kernels to the __reset function

The entry point specified in the elf file should always point to
executable code, and not to the interrupt vector table.  Pointing to the
vector table as the entry point in the elf file presents problems with
running the kernel against a debugger as the debugger starts the program
counter at the top of the interrupt vector table.

Change-Id: I76051f6e99a44bab72936670bead5fb8191a6ec7
Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
This commit is contained in:
Tim Nordell 2017-01-13 09:54:15 -06:00 committed by Anas Nashif
commit 93801c6447
2 changed files with 1 additions and 8 deletions

View file

@ -50,14 +50,12 @@ GDATA(_interrupt_stack)
SECTION_SUBSEC_FUNC(TEXT,_reset_section,__reset)
/*
* In non-XIP kernels, the entry point is located at the __reset symbol, which
* The entry point is located at the __reset symbol, which
* is fetched by a XIP image playing the role of a bootloader, which jumps to
* it, not through the reset vector mechanism. Such bootloaders might want to
* search for a __start symbol instead, so create that alias here.
*/
#if !defined(CONFIG_XIP)
SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
#endif
/* lock interrupts: will get unlocked when switch to main task */
#if defined(CONFIG_ARMV6_M)

View file

@ -28,11 +28,6 @@ GDATA(_main_stack)
SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table)
/* in XIP kernels. the entry point is also the start of the vector table */
#if defined(CONFIG_XIP)
SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,__start)
#endif
/*
* setting the _very_ early boot on the main stack allows to use memset
* on the interrupt stack when CONFIG_INIT_STACKS is enabled before