cmake: Add the TEXT_START location to zephyr_linker_sources()
Places linker code at or near the beginning of the text section. Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
parent
076eee3abc
commit
d1c2a4edbf
8 changed files with 45 additions and 3 deletions
|
@ -87,6 +87,10 @@ SECTIONS {
|
|||
_image_rom_start = .;
|
||||
_image_text_start = .;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
/* when !XIP, .text is in RAM, and vector table must be at its very start */
|
||||
|
||||
KEEP(*(.exc_vector_table))
|
||||
|
|
|
@ -156,6 +156,10 @@ SECTIONS
|
|||
|
||||
. = CONFIG_TEXT_SECTION_OFFSET;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#if defined(CONFIG_SW_VECTOR_RELAY)
|
||||
KEEP(*(.vector_relay_table))
|
||||
KEEP(*(".vector_relay_table.*"))
|
||||
|
|
|
@ -153,6 +153,10 @@ SECTIONS
|
|||
|
||||
. = CONFIG_TEXT_SECTION_OFFSET;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#if defined(CONFIG_SW_VECTOR_RELAY)
|
||||
KEEP(*(.vector_relay_table))
|
||||
KEEP(*(".vector_relay_table.*"))
|
||||
|
|
|
@ -120,6 +120,12 @@ SECTIONS
|
|||
. = ALT_CPU_RESET_ADDR;
|
||||
|
||||
_image_text_start = .;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
|
||||
*(.text)
|
||||
*(".text.*")
|
||||
*(.gnu.linkonce.t.*)
|
||||
|
|
|
@ -88,6 +88,12 @@ SECTIONS
|
|||
KEEP(*(".openocd_debug.*"))
|
||||
|
||||
_image_text_start = .;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
|
||||
*(.text)
|
||||
*(".text.*")
|
||||
*(.gnu.linkonce.t.*)
|
||||
|
|
|
@ -86,6 +86,12 @@ SECTIONS
|
|||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
. = CONFIG_TEXT_SECTION_OFFSET;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
|
||||
*(.text_start)
|
||||
*(".text_start.*")
|
||||
*(.text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue