aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-06-09 15:34:45 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-06-09 15:34:45 +0000
commitded396e753b304ffc3f32b91ccff3b816f478547 (patch)
treea2a4f2477823ab6e68251b9ca162c7c2836c2c51
parent2a4449a3b51e3a8a74111c0d0cdbfcfbf0280cc7 (diff)
downloadgcc-ded396e753b304ffc3f32b91ccff3b816f478547.zip
gcc-ded396e753b304ffc3f32b91ccff3b816f478547.tar.gz
gcc-ded396e753b304ffc3f32b91ccff3b816f478547.tar.bz2
re PR libstdc++/44461 (__cxa_end_cleanup ends up in wrong section i.e. not in .text)
2010-06-09 Khem Raj <raj.khem@gmail.com> PR libstdc++/44461 * libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection to emit inline assembly into .text section. From-SVN: r160488
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/libsupc++/eh_arm.cc12
2 files changed, 14 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 84eb514..2ea2b29 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-09 Khem Raj <raj.khem@gmail.com>
+
+ PR libstdc++/44461
+ * libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection
+ to emit inline assembly into .text section.
+
2010-06-09 Paolo Carlini <paolo.carlini@oracle.com>
Revert:
diff --git a/libstdc++-v3/libsupc++/eh_arm.cc b/libstdc++-v3/libsupc++/eh_arm.cc
index 58997cc..e508ada 100644
--- a/libstdc++-v3/libsupc++/eh_arm.cc
+++ b/libstdc++-v3/libsupc++/eh_arm.cc
@@ -157,22 +157,26 @@ __gnu_end_cleanup(void)
// Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3.
// Also push r4 to preserve stack alignment.
#ifdef __thumb__
-asm (".global __cxa_end_cleanup\n"
+asm (" .pushsection .text.__cxa_end_cleanup\n"
+" .global __cxa_end_cleanup\n"
" .type __cxa_end_cleanup, \"function\"\n"
" .thumb_func\n"
"__cxa_end_cleanup:\n"
" push\t{r1, r2, r3, r4}\n"
" bl\t__gnu_end_cleanup\n"
" pop\t{r1, r2, r3, r4}\n"
-" bl\t_Unwind_Resume @ Never returns\n");
+" bl\t_Unwind_Resume @ Never returns\n"
+" .popsection\n");
#else
-asm (".global __cxa_end_cleanup\n"
+asm (" .pushsection .text.__cxa_end_cleanup\n"
+" .global __cxa_end_cleanup\n"
" .type __cxa_end_cleanup, \"function\"\n"
"__cxa_end_cleanup:\n"
" stmfd\tsp!, {r1, r2, r3, r4}\n"
" bl\t__gnu_end_cleanup\n"
" ldmfd\tsp!, {r1, r2, r3, r4}\n"
-" bl\t_Unwind_Resume @ Never returns\n");
+" bl\t_Unwind_Resume @ Never returns\n"
+" .popsection\n");
#endif
#endif