diff mbox series

[Ada] sigtramp: fix powerpc64 against -fPIC

Message ID 20210507093822.GA140571@adacore.com
State New
Headers show
Series [Ada] sigtramp: fix powerpc64 against -fPIC | expand

Commit Message

Pierre-Marie de Rodat May 7, 2021, 9:38 a.m. UTC
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


	* sigtramp-vxworks-target.inc: Use a local label for the TOC.
diff mbox series


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")
 #define SIGTRAMP_BODY \
 CR("") \
-TCR("0:") \
-TCR("addis 2,12,.TOC.-0@ha") \
-TCR("addi 2,2,.TOC.-0@l") \
+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") \