diff options
author | 2020-10-01 11:44:44 +0100 | |
---|---|---|
committer | 2020-10-01 22:44:14 +0100 | |
commit | eff906561a44464e88e40ab6b9f99b1a79f3d7fa (patch) | |
tree | 1f1e64238320f861145ebf8693816674c608d895 /cortex-m-rt | |
parent | 109a832a4460236cd224d872d07665a745d6435b (diff) | |
download | cortex-m-eff906561a44464e88e40ab6b9f99b1a79f3d7fa.tar.gz cortex-m-eff906561a44464e88e40ab6b9f99b1a79f3d7fa.tar.zst cortex-m-eff906561a44464e88e40ab6b9f99b1a79f3d7fa.zip |
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 <hugues.devalon@arm.com>
Diffstat (limited to 'cortex-m-rt')
-rw-r--r-- | cortex-m-rt/link.x.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index f4f4959..f1a921d 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -110,6 +110,18 @@ SECTIONS . = ALIGN(4); /* Ensure __erodata is aligned if something unaligned is inserted after .rodata */ __erodata = .; + /* ### .gnu.sgstubs + This section contains the TrustZone-M veneers put there by the Arm GNU linker. */ + . = ALIGN(32); /* Security Attribution Unit blocks must be 32 bytes aligned. */ + __veneer_base = ALIGN(4); + .gnu.sgstubs : ALIGN(4) + { + *(.gnu.sgstubs*) + . = ALIGN(4); /* 4-byte align the end (VMA) of this section */ + } > FLASH + . = ALIGN(4); /* Ensure __veneer_limit is aligned if something unaligned is inserted after .gnu.sgstubs */ + __veneer_limit = .; + /* ## Sections in RAM */ /* ### .data */ .data : ALIGN(4) |