* [Ada] sigtramp: fix powerpc64 against -fPIC
@ 2021-05-07 9:38 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-07 9:38 UTC (permalink / raw)
To: gcc-patches; +Cc: Frederic Konrad
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
Use a local label to set the TOC location on powerpc64 to prevent
DT_TEXTREL, not supported by the VxWorks loader for shared libraries.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sigtramp-vxworks-target.inc: Use a local label for the TOC.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 609 bytes --]
diff --git a/gcc/ada/sigtramp-vxworks-target.inc b/gcc/ada/sigtramp-vxworks-target.inc
--- a/gcc/ada/sigtramp-vxworks-target.inc
+++ b/gcc/ada/sigtramp-vxworks-target.inc
@@ -319,9 +319,9 @@ TCR("blr")
#else
#define SIGTRAMP_BODY \
CR("") \
-TCR("0:") \
-TCR("addis 2,12,.TOC.-0@ha") \
-TCR("addi 2,2,.TOC.-0@l") \
+TCR(".LOC_SIGTMP_COM_0:") \
+TCR("addis 2,12,.TOC.-.LOC_SIGTMP_COM_0@ha") \
+TCR("addi 2,2,.TOC.-.LOC_SIGTMP_COM_0@l") \
TCR(".localentry __gnat_sigtramp_common,.-__gnat_sigtramp_common") \
TCR("# Allocate frame and save the non-volatile") \
TCR("# registers we're going to modify") \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-07 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 9:38 [Ada] sigtramp: fix powerpc64 against -fPIC Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).