diff options
author | Richard Henderson <rth@twiddle.net> | 2013-02-12 17:15:52 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-02-28 00:16:05 -0800 |
commit | 783a65c253b144cd7b500720cf37bbddaf861a03 (patch) | |
tree | 09e6655f98d7e27b1ec35a7ce5140f3ee907a6ad /ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c | |
parent | 63cc0e75eadde85676bdde0fe8c90b540c200465 (diff) |
arm: Introduce and use PC_OFS
Scour the source for raw "-8" adjustments that are related to the
offset created by reading the pc.
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c index 58ca9acf64..caa6a26260 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -84,6 +84,9 @@ __unwind_freeres (void) ARM unwinder relies on register state at entrance. So we write this in assembly. */ +#define STR1(S) #S +#define STR(S) STR1(S) + asm ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" @@ -118,11 +121,7 @@ asm ( " b 5b\n" " " CFI_ENDPROC "\n" " .align 2\n" -#ifdef __thumb2__ -"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n" -#else -"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" -#endif +"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - " STR (PC_OFS) "\n" "2: .word libgcc_s_resume(GOTOFF)\n" " .size _Unwind_Resume, .-_Unwind_Resume\n" ); |