aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2011-05-03 16:22:03 -0700
committerChris Demetriou <cgd@gcc.gnu.org>2011-05-03 16:22:03 -0700
commit6ace0756af2d682fbd2def08e4777c6f66f0e34f (patch)
treec77ac9f8eee6e6a00f4ac69e456e0e26bd7fb086 /libgcc
parent8a3cabe30f9d82daf46a500e339afc5172267d25 (diff)
downloadgcc-6ace0756af2d682fbd2def08e4777c6f66f0e34f.zip
gcc-6ace0756af2d682fbd2def08e4777c6f66f0e34f.tar.gz
gcc-6ace0756af2d682fbd2def08e4777c6f66f0e34f.tar.bz2
morestack.S (__i686.get_pc_thunk.bx): New.
2011-05-03 Chris Demetriou <cgd@google.com> * config/i386/morestack.S (__i686.get_pc_thunk.bx): New. From-SVN: r173345
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog4
-rw-r--r--libgcc/config/i386/morestack.S18
2 files changed, 22 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 0892085..ac99ddb 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-03 Chris Demetriou <cgd@google.com>
+
+ * config/i386/morestack.S (__i686.get_pc_thunk.bx): New.
+
2011-03-22 Joseph Myers <joseph@codesourcery.com>
* config.host (alpha*-*-gnu*, arc-*-elf*, arm*-*-netbsd*,
diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S
index 10fa1fd..5db5e50 100644
--- a/libgcc/config/i386/morestack.S
+++ b/libgcc/config/i386/morestack.S
@@ -449,6 +449,24 @@ __morestack:
.size __morestack, . - __morestack
#endif
+#if !defined(__x86_64__) && defined(__PIC__)
+# Output the thunk to get PC into bx, since we use it above.
+# (__i686 was already undef'd above; don't need to worry about it here.)
+ .section .text.__i686.get_pc_thunk.bx,"axG",@progbits,__i686.get_pc_thunk.bx,comdat
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+#ifdef __ELF__
+ .type __i686.get_pc_thunk.bx, @function
+#endif
+__i686.get_pc_thunk.bx:
+ .cfi_startproc
+ movl (%esp), %ebx
+ ret
+ .cfi_endproc
+#ifdef __ELF__
+ .size __i686.get_pc_thunk.bx, . - __i686.get_pc_thunk.bx
+#endif
+#endif
# The exception table. This tells the personality routine to execute
# the exception handler.