about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan S. Arnold <rsa@us.ibm.com>2011-02-15 09:50:09 -0600
committerryanarn <ryanarn@igoo.rchland.ibm.com>2011-02-15 09:50:09 -0600
commitc3b77b811fc7106a4cc9d491c1cc9358fb266c42 (patch)
treed294be8610f3e630d68a68683203352ce12c5b6a
parent89972db69f823f89a5d5ea89ca1b98315701c6ab (diff)
downloadglibc-c3b77b811fc7106a4cc9d491c1cc9358fb266c42.tar.gz
glibc-c3b77b811fc7106a4cc9d491c1cc9358fb266c42.tar.xz
glibc-c3b77b811fc7106a4cc9d491c1cc9358fb266c42.zip
Prevent VSX type TOC ref in _dl_start before relocs are resolved.
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.
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/powerpc/powerpc64/power7/Makefile6
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 65c45fe168..77b9927e1f 100644
--- 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
index 0000000000..54b0fd9aee
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power7/Makefile
@@ -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
+