about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan S. Arnold <rsa@us.ibm.com>2011-02-16 13:04:16 -0600
committerryanarn <ryanarn@igoo.rchland.ibm.com>2011-02-16 13:04:16 -0600
commit8130708fe5419b8bb17cfeb646678ac431ec797d (patch)
tree0780557ce2ca45c7fd1781aceee4583c8a94b82c
parentc5413f82ce8cbe204536b76b57be2b4d35f0327a (diff)
downloadglibc-8130708fe5419b8bb17cfeb646678ac431ec797d.tar.gz
glibc-8130708fe5419b8bb17cfeb646678ac431ec797d.tar.xz
glibc-8130708fe5419b8bb17cfeb646678ac431ec797d.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--ChangeLog7
-rw-r--r--sysdeps/powerpc/powerpc64/power7/Makefile5
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 65c45fe168..1ba0ee51da 100644
--- 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
index 0000000000..b0f45205b9
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power7/Makefile
@@ -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