]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
S390: Use fPIC to avoid R_390_GOT12 relocation in gcrt1.o.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Wed, 11 May 2016 13:51:25 +0000 (15:51 +0200)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Wed, 11 May 2016 13:51:25 +0000 (15:51 +0200)
if glibc is build with -march=z900 | -march=z990,
the startup file gcrt1.o (used if you link with gcc -pg)
contains R_390_GOT12 | R_390_GOT20 relocations.
Thus, an entry in the GOT can be addressed relative to the GOT pointer
with a 12 | 20 bit displacement value.
The startup files should not contain R_390_GOT12,
R_390_GOT20 relocations, but R_390_GOTENT ones.

This patch removes the overrides of pic-ccflag and
the default pic-ccflag = -fPIC in Makeconfig
is used instead to get the R_390_GOTENT relocations in gcrt1.o.

ChangeLog:

* sysdeps/s390/s390-32/Makefile (pic-ccflag): Remove.
* sysdeps/s390/s390-64/Makefile: Likewise.

ChangeLog
sysdeps/s390/s390-32/Makefile
sysdeps/s390/s390-64/Makefile

index 8958a06d2abd14e121c09a957b18680ada76b118..7533a3d9dee2138a24ad8a60a44548f4dd74aa63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-11  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * sysdeps/s390/s390-32/Makefile (pic-ccflag): Remove.
+       * sysdeps/s390/s390-64/Makefile: Likewise.
+
 2016-05-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/i386/i686/multiarch/Makefile (gen-as-const-headers):
index 057862d91b189da672b98494b31f98f69e081aaf..a07f2986aebb33a140224c23cd90ef91b1ca7cba 100644 (file)
@@ -1,5 +1,3 @@
-pic-ccflag = -fpic
-
 ifeq ($(subdir),gmon)
 sysdep_routines += s390-mcount
 endif
index ce4f0c5c88eebd3de339f92848502005a2e4934f..5909d1f7aa614f169b3ac0ee5a2cc12b4bd1e50f 100644 (file)
@@ -1,5 +1,3 @@
-pic-ccflag = -fpic
-
 ifeq ($(subdir),gmon)
 sysdep_routines += s390x-mcount
 endif