diff options
author | Clément Chigot <chigot@adacore.com> | 2024-06-10 14:37:57 +0200 |
---|---|---|
committer | Richard Earnshaw <rearnsha@arm.com> | 2024-07-09 15:25:49 +0100 |
commit | a7b62e886ef877a423eccf708274dde4df3498da (patch) | |
tree | f7c306717bd52c0fc8b2a593e124498fb8e26ea4 /newlib | |
parent | 80550ffc2ed6274531058059f577fc4a64f00404 (diff) | |
download | newlib-a7b62e886ef877a423eccf708274dde4df3498da.zip newlib-a7b62e886ef877a423eccf708274dde4df3498da.tar.gz newlib-a7b62e886ef877a423eccf708274dde4df3498da.tar.bz2 |
libc/arm: add missing .cfi_sections
The modifications added by the series "M-profile PACBTI-enablement"
(see 9d6b00511e50a54d2472d11f75f7c0f2b4a98b24) have introduced a couple
of .cfi_* instructions.
Like for e6459123e497409a9e3d845c39829a9602ba55a4, these instructions
create object files which contain .eh_frame sections. However, ARM uses
its own unwind info format, not .eh_frame, which is generated by
ARM-specific directives, not .cfi_*. The .eh_frame sections are useless,
but also not removed by strip and may be harmful with some linker
scripts.
Adding ".cfi_sections .debug_frame" (as in glibc) moves the generated
directives towards .debug_frame instead of .eh_frame. Making them easier
to handle.
* libc/machine/arm/aeabi_memmove-thumb2.S: Use .cfi_sections
.debug_frame.
* libc/machine/arm/aeabi_memset-thumb2.S: Likewise.
* libc/machine/arm/memchr.S: Likewise.
* libc/machine/arm/memcpy-armv7m.S: Likewise.
* libc/machine/arm/setjmp.S: Likewise.
* libc/machine/arm/strlen-armv7.S: Likewise.
* libc/machine/arm/strlen-thumb2-Os.S: Likewise.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/machine/arm/aeabi_memmove-thumb2.S | 1 | ||||
-rw-r--r-- | newlib/libc/machine/arm/aeabi_memset-thumb2.S | 1 | ||||
-rw-r--r-- | newlib/libc/machine/arm/memchr.S | 1 | ||||
-rw-r--r-- | newlib/libc/machine/arm/memcpy-armv7m.S | 1 | ||||
-rw-r--r-- | newlib/libc/machine/arm/setjmp.S | 1 | ||||
-rw-r--r-- | newlib/libc/machine/arm/strlen-armv7.S | 1 | ||||
-rw-r--r-- | newlib/libc/machine/arm/strlen-thumb2-Os.S | 1 |
7 files changed, 7 insertions, 0 deletions
diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S index 20ca993..3018e74 100644 --- a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S @@ -36,6 +36,7 @@ ASM_ALIAS __aeabi_memmove8 __aeabi_memmove __aeabi_memmove: .fnstart + .cfi_sections .debug_frame .cfi_startproc prologue 4 cmp r0, r1 diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S index 6b77d38..a1b8f05 100644 --- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S +++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S @@ -33,6 +33,7 @@ .global __aeabi_memset .type __aeabi_memset, %function .fnstart + .cfi_sections .debug_frame .cfi_startproc ASM_ALIAS __aeabi_memset4 __aeabi_memset ASM_ALIAS __aeabi_memset8 __aeabi_memset diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S index d13ef8d..f0b3650 100644 --- a/newlib/libc/machine/arm/memchr.S +++ b/newlib/libc/machine/arm/memchr.S @@ -293,6 +293,7 @@ memchr: .global memchr .type memchr,%function .fnstart + .cfi_sections .debug_frame .cfi_startproc memchr: @ r0 = start of memory to scan diff --git a/newlib/libc/machine/arm/memcpy-armv7m.S b/newlib/libc/machine/arm/memcpy-armv7m.S index ec1ad64..13ffdb3 100644 --- a/newlib/libc/machine/arm/memcpy-armv7m.S +++ b/newlib/libc/machine/arm/memcpy-armv7m.S @@ -88,6 +88,7 @@ .thumb .thumb_func .fnstart + .cfi_sections .debug_frame .cfi_startproc .type memcpy, %function memcpy: diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S index 5e59522..0070f17 100644 --- a/newlib/libc/machine/arm/setjmp.S +++ b/newlib/libc/machine/arm/setjmp.S @@ -183,6 +183,7 @@ SYM (.arm_start_of.\name): MODE .globl SYM (\name) .fnstart + .cfi_sections .debug_frame .cfi_startproc TYPE (\name) SYM (\name): diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S index 6aa122c..1c2b5c5 100644 --- a/newlib/libc/machine/arm/strlen-armv7.S +++ b/newlib/libc/machine/arm/strlen-armv7.S @@ -106,6 +106,7 @@ def_fn strlen p2align=6 .fnstart + .cfi_sections .debug_frame .cfi_startproc prologue 4 5 push_ip=HAVE_PAC_LEAF pld [srcin, #0] diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S index 4adbc61..b8a615a 100644 --- a/newlib/libc/machine/arm/strlen-thumb2-Os.S +++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S @@ -47,6 +47,7 @@ def_fn strlen p2align=1 .fnstart + .cfi_sections .debug_frame .cfi_startproc prologue mov r3, r0 |