summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/libsupc++/eh_arm.cc
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-09 15:34:45 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-09 15:34:45 +0000
commitf9ade9e97d3f3a3316a1f94cea0d84f5dc9852aa (patch)
treea2a4f2477823ab6e68251b9ca162c7c2836c2c51 /libstdc++-v3/libsupc++/eh_arm.cc
parenteab615be9ece080101bdcc8b4690d879e9e313e1 (diff)
downloadppe42-gcc-f9ade9e97d3f3a3316a1f94cea0d84f5dc9852aa.tar.gz
ppe42-gcc-f9ade9e97d3f3a3316a1f94cea0d84f5dc9852aa.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++/eh_arm.cc')
-rw-r--r--libstdc++-v3/libsupc++/eh_arm.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/libstdc++-v3/libsupc++/eh_arm.cc b/libstdc++-v3/libsupc++/eh_arm.cc
index 58997cc1768..e508ada9e09 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
OpenPOWER on IntegriCloud