Skip to content

Commit d680f0a

Browse files
aescolarcarlescufi
authored andcommitted
arch posix/native: Let's make use of new split native simulator if
Let's make it possible to use the newly introduced definitions for separated sub-sections for .data and .text symbols in the NATIVE_SIMULATOR_IF (symbols visible to the runner and other images). Note all symbols anothed like before with just NATIVE_SIMULATOR_IF will keep next to .text just like before. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 9d5a096 commit d680f0a

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

include/zephyr/arch/posix/linker.ld

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ SECTION_DATA_PROLOGUE(_NOINIT_SECTION_NAME,,)
8686

8787
} INSERT AFTER .data;
8888

89-
SECTIONS
90-
{
9189
#include <zephyr/arch/posix/native_sim_interface.ld>
92-
} INSERT AFTER .text;
9390

9491
/*
9592
* Note that the INSERT command actually changes the meaning of the -T command

include/zephyr/arch/posix/native_sim_interface.ld

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,21 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
SECTION_PROLOGUE (.native_sim_if,,)
7+
#include <zephyr/linker/sections.h>
8+
9+
SECTIONS
10+
{
11+
SECTION_PROLOGUE (.native_sim_if.data,,)
12+
{
13+
KEEP(*(.native_sim_if.data));
14+
}
15+
} INSERT AFTER .data;
16+
17+
SECTIONS
818
{
9-
KEEP(*(.native_sim_if));
10-
KEEP(*(.native_sim_if.*));
11-
}
19+
SECTION_PROLOGUE (.native_sim_if,,)
20+
{
21+
KEEP(*(.native_sim_if));
22+
KEEP(*(.native_sim_if.*));
23+
}
24+
} INSERT AFTER .text;

0 commit comments

Comments
 (0)