tramp.S (trampoline_setup): Use a longcall sequence in the non pic case on VxWorks.
authorOlivier Hainque <hainque@adacore.com>
Fri, 25 May 2012 08:20:03 +0000 (08:20 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Fri, 25 May 2012 08:20:03 +0000 (08:20 +0000)
        libgcc/
        * config/rs6000/vxworks/tramp.S (trampoline_setup): Use a longcall
        sequence in the non pic case on VxWorks.

From-SVN: r187871

libgcc/ChangeLog
libgcc/config/rs6000/tramp.S

index 8f343a3c82e79a13c249cbe73bb4fb622ca2ab60..db4c801580e17c76dbc015d7aa9693aa4feee909 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-25  Olivier Hainque  <hainque@adacore.com>
+
+       * config/rs6000/vxworks/tramp.S (trampoline_setup): Use a longcall
+       sequence in the non pic case on VxWorks.
+
 2012-05-24  Olivier Hainque  <hainque@adacore.com>
 
        * Makefile.in: Move dependency on install-unwind_h from
index 133b98840f11f69fc963a976f60b2e6f8082ff8c..d274d0962059869d3bb308208eac64a77d2e31f2 100644 (file)
@@ -95,6 +95,16 @@ FUNC_START(__trampoline_setup)
        blr
 
 .Labort:
+/* Use a longcall sequence in the non PIC case on VxWorks, to prevent
+   possible relocation errors if this is module-loaded very far away from
+   the 'abort' entry point.  */
+#if defined (__VXWORKS__) && ! (defined __PIC__ || defined __pic__)
+        lis   r11,JUMP_TARGET(abort)@ha
+        addic r11,r11,JUMP_TARGET(abort)@l
+        mtlr  r11
+        blrl
+#else
+
 #if (defined __PIC__ || defined __pic__) && defined HAVE_AS_REL16
        bcl     20,31,1f
 1:     mflr    r30
@@ -105,3 +115,5 @@ FUNC_START(__trampoline_setup)
 FUNC_END(__trampoline_setup)
 
 #endif
+
+#endif