diff options
author | Olivier Hainque <hainque@adacore.com> | 2012-05-25 08:20:03 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2012-05-25 08:20:03 +0000 |
commit | c57685107c297b07a00f5a19fe0d475f7865881d (patch) | |
tree | 82400b3f70e02446852f2477ffaa4727616d9183 /libgcc | |
parent | 489381473deb41fee4842515709fdcdb79745acf (diff) | |
download | gcc-c57685107c297b07a00f5a19fe0d475f7865881d.zip gcc-c57685107c297b07a00f5a19fe0d475f7865881d.tar.gz gcc-c57685107c297b07a00f5a19fe0d475f7865881d.tar.bz2 |
tramp.S (trampoline_setup): Use a longcall sequence in the non pic case on VxWorks.
libgcc/
* config/rs6000/vxworks/tramp.S (trampoline_setup): Use a longcall
sequence in the non pic case on VxWorks.
From-SVN: r187871
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/config/rs6000/tramp.S | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 8f343a3..db4c801 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -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 diff --git a/libgcc/config/rs6000/tramp.S b/libgcc/config/rs6000/tramp.S index 133b988..d274d09 100644 --- a/libgcc/config/rs6000/tramp.S +++ b/libgcc/config/rs6000/tramp.S @@ -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 |