This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f4425c759fd libc/elf: add the ARM exception tables to the module link
script
f4425c759fd is described below
commit f4425c759fd2e6f6c547ca1f093b973ddeba5be7
Author: anjiahao <[email protected]>
AuthorDate: Fri Nov 27 03:37:55 2026 +0800
libc/elf: add the ARM exception tables to the module link script
ARM modules carry .ARM.extab and .ARM.exidx for C++ exception
unwinding; the module link script has no output section for them, so
they are placed by the default rules and the unwind information ends
up outside the read-only segment the loader maps. Add both, with the
__exidx_start/__exidx_end symbols the unwinder expects.
Signed-off-by: anjiahao <[email protected]>
---
libs/libc/elf/gnu-elf.ld.in | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libs/libc/elf/gnu-elf.ld.in b/libs/libc/elf/gnu-elf.ld.in
index b2d7096514e..28c9ec99b48 100644
--- a/libs/libc/elf/gnu-elf.ld.in
+++ b/libs/libc/elf/gnu-elf.ld.in
@@ -127,6 +127,20 @@ SECTIONS
_erodata = . ;
} PHDR_TEXT
+ /* ARM exception unwind tables travel with the read-only data. */
+
+ .ARM.extab :
+ {
+ *(.ARM.extab*)
+ } PHDR_TEXT
+
+ .ARM.exidx :
+ {
+ __exidx_start = ABSOLUTE(.);
+ *(.ARM.exidx*)
+ __exidx_end = ABSOLUTE(.);
+ } PHDR_TEXT
+
.eh_frame :
{
KEEP (*(.eh_frame))