Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit 65e5158

Browse files
committed
Add a section to place the veneers in memory
The veneers are for now only generated by the Arm GNU linker when it spots an entry function (one that was decorated with the cmse_nonsecure_entry attribute). Adding this section will allow to configure the SAU to make this section Non-Secure Callable. Signed-off-by: Hugues de Valon <[email protected]>
1 parent 046c8f5 commit 65e5158

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

link.x.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ SECTIONS
110110
. = ALIGN(4); /* Ensure __erodata is aligned if something unaligned is inserted after .rodata */
111111
__erodata = .;
112112

113+
/* ### .gnu.sgstubs
114+
This section contains the TrustZone-M veneers put there by the Arm GNU linker. */
115+
.gnu.sgstubs : ALIGN(32)
116+
{
117+
__veneer_base = .;
118+
*(.gnu.sgstubs*)
119+
__veneer_limit = .;
120+
} > FLASH
121+
113122
/* ## Sections in RAM */
114123
/* ### .data */
115124
.data : ALIGN(4)

0 commit comments

Comments
 (0)