extensions.cmake: Replace TEXT_START with ROM_START
In zephyr_linker_sources(). This is done since the point of the location is to place things at given offsets. This can only be done consistenly if the linker code is placed into the _first_ section. All uses of TEXT_START are replaced with ROM_START. ROM_START is only supported in some arches, as some arches have several custom sections before text. These don't currently have ROM_START or TEXT_START available, but that could be added with a bit of refactoring in their linker script. No SORT_KEYs are changed. This also fixes an error introduced when TEXT_START was added, where TEXT_SECTION_OFFSET was applied to riscv's common linker.ld instead of to openisa_rv32m1's specific linker.ld. Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
parent
5fcbe4e5d5
commit
05f0d85b6a
16 changed files with 39 additions and 42 deletions
|
@ -87,10 +87,11 @@ SECTIONS {
|
|||
_image_rom_start = .;
|
||||
_image_text_start = .;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
/* Located in generated directory. This file is populated by calling
|
||||
* zephyr_linker_sources(ROM_START ...). This typically contains the vector
|
||||
* table and debug information.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#include <snippets-rom-start.ld>
|
||||
|
||||
*(.text)
|
||||
*(".text.*")
|
||||
|
|
|
@ -138,10 +138,11 @@ SECTIONS
|
|||
SECTION_PROLOGUE(rom_start,,)
|
||||
{
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
/* Located in generated directory. This file is populated by calling
|
||||
* zephyr_linker_sources(ROM_START ...). This typically contains the vector
|
||||
* table and debug information.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#include <snippets-rom-start.ld>
|
||||
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
|
|
|
@ -135,10 +135,11 @@ SECTIONS
|
|||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
/* Located in generated directory. This file is populated by calling
|
||||
* zephyr_linker_sources(ROM_START ...). This typically contains the vector
|
||||
* table and debug information.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#include <snippets-rom-start.ld>
|
||||
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
|
|
|
@ -121,11 +121,6 @@ SECTIONS
|
|||
|
||||
_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.*)
|
||||
|
|
|
@ -89,11 +89,6 @@ SECTIONS
|
|||
|
||||
_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,10 +86,11 @@ SECTIONS
|
|||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
/* Located in generated directory. This file is populated by calling
|
||||
* zephyr_linker_sources(ROM_START ...). This typically contains the vector
|
||||
* table and debug information.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#include <snippets-rom-start.ld>
|
||||
|
||||
*(.text_start)
|
||||
*(".text_start.*")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue