From 458bc9b1d0ab11af7766469e9e66de1d5b97f502 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 18 Nov 2015 09:54:30 +1030 Subject: [PATCH] A default of -z relro (as on Fedora) defeats the deliberate mis-alignment of .got in the testcase. POWERPC64_TOC_POINTER_ALIGNMENT A default of -z relro (as on Fedora) defeats the deliberate mis-alignment of .got in the testcase. * configure.ac (POWERPC64_TOC_POINTER_ALIGNMENT): Pass -z norelro to ld. * configure: Regenerate. From-SVN: r230509 --- gcc/ChangeLog | 6 ++++++ gcc/configure | 2 +- gcc/configure.ac | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e20b434942..f700f76893d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-18 Alan Modra + + * configure.ac (POWERPC64_TOC_POINTER_ALIGNMENT): Pass -z norelro + to ld. + * configure: Regenerate. + 2015-11-17 Tom de Vries * tree-ssa-loop.c (pass_tree_loop_init::execute): Improve comments. diff --git a/gcc/configure b/gcc/configure index d5f6dd477b5..d465597bcd3 100755 --- a/gcc/configure +++ b/gcc/configure @@ -28058,7 +28058,7 @@ _start: x: .quad .TOC. EOF if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ - && $gcc_cv_ld $emul_name -o conftest conftest.o > /dev/null 2>&1; then + && $gcc_cv_ld $emul_name -z norelro -o conftest conftest.o > /dev/null 2>&1; then gcc_cv_ld_toc_align=`$gcc_cv_nm conftest | ${AWK} '/\.TOC\./ { match ($0, "0[[:xdigit:]]*", a); print strtonum ("0x" substr(a[0], length(a[0])-3)) }'` fi rm -f conftest conftest.o conftest.s diff --git a/gcc/configure.ac b/gcc/configure.ac index 34df5492497..7547e3ac130 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5257,7 +5257,7 @@ _start: x: .quad .TOC. EOF if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ - && $gcc_cv_ld $emul_name -o conftest conftest.o > /dev/null 2>&1; then + && $gcc_cv_ld $emul_name -z norelro -o conftest conftest.o > /dev/null 2>&1; then gcc_cv_ld_toc_align=`$gcc_cv_nm conftest | ${AWK} '/\.TOC\./ { match ($0, "0[[[:xdigit:]]]*", a); print strtonum ("0x" substr(a[[0]], length(a[[0]])-3)) }'` fi rm -f conftest conftest.o conftest.s -- 2.30.2