]> 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>
Tue, 15 Feb 2011 15:50:09 +0000 (09:50 -0600)
committerryanarn <ryanarn@igoo.rchland.ibm.com>
Tue, 15 Feb 2011 15:50:09 +0000 (09:50 -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..77b9927e1f4da2b53a6b1daf32afe59d55af082a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-14  Ryan S. Arnold  <rsa@us.ibm.com>
+
+       * sysdeps/powerpc/powerpc64/power7/Makefile (CFLAGS-rtld.c): Add
+       -mno-vsx to prevent GCC from using a VSX register and a TOC
+       reference before relocations are resolved under -O3 optimization.
+
 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..54b0fd9
--- /dev/null
@@ -0,0 +1,6 @@
+ifeq ($(subdir),elf)
+# Prevent the use of VSX instructions in _dl_start, which under -O3 optimization
+# may require a TOC reference before relocations are resolved.
+CFLAGS-rtld.c = -mno-vsx
+endif
+