]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Prevent VSX type TOC ref in _dl_start before relocs are resolved.
authorRyan S. Arnold <rsa@us.ibm.com>
Wed, 16 Feb 2011 19:04:16 +0000 (13:04 -0600)
committerryanarn <ryanarn@igoo.rchland.ibm.com>
Wed, 16 Feb 2011 19:04:16 +0000 (13:04 -0600)
Disable VSX instruction usage in rtld.c with -mno-vsx so that, under
-O3 optimization, a TOC reference isn't used for a zero constant in a
VSX register prior to resolution of relocations.

ChangeLog
sysdeps/powerpc/powerpc64/power7/Makefile [new file with mode: 0644]

index 65c45fe168618d6238e7a7890740e721b27b2134..1ba0ee51daa028741b3b3a7fdb7bd9c4bc4dd80d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-16  Ryan S. Arnold  <rsa@us.ibm.com>
+
+       * sysdeps/powerpc/powerpc64/power7/Makefile: New file which adds
+       -mno-vsx to the CFLAGS-rtld.c variable to avoid using VSX registers and
+       insns in _dl_start to prevent a TOC reference before relocs are
+       resolved.
+
 2010-11-10  Luis Machado  <luisgpm@br.ibm.com>
 
        * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (__ieee754_sqrtl): Force
diff --git a/sysdeps/powerpc/powerpc64/power7/Makefile b/sysdeps/powerpc/powerpc64/power7/Makefile
new file mode 100644 (file)
index 0000000..b0f4520
--- /dev/null
@@ -0,0 +1,5 @@
+ifeq ($(subdir),elf)
+# Prevent the use of VSX registers and insns in _dl_start, which under -O3
+# optimization may require a TOC reference before relocations are resolved.
+CFLAGS-rtld.c += -mno-vsx
+endif