aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2015-03-11 22:07:51 -0700
committerCary Coutant <ccoutant@gmail.com>2015-03-11 22:07:51 -0700
commit943c8b4393ca97b6c4805c724069028be6955b89 (patch)
tree8a6cc1d7b292bc71ab44ff2477349a462d7601a5 /gold/options.cc
parent97737159383af8af7a766ad3dade8ed0d11fa6a1 (diff)
downloadgdb-943c8b4393ca97b6c4805c724069028be6955b89.zip
gdb-943c8b4393ca97b6c4805c724069028be6955b89.tar.gz
gdb-943c8b4393ca97b6c4805c724069028be6955b89.tar.bz2
Fix gold incremental test failures.
Newer version of GCC pass -z relro to the linker, but incremental linking does not support relro. This patch adds a check to complain about the conflict, and changes the testsuite to pass -z norelro to the incremental tests. 2015-03-11 Cary Coutant <ccoutant@google.com> gold/ * options.cc (General_options::finalize): Don't allow -z relro with incremental linking. * testsuite/Makefile.am (incremental_test): Add -z norelro. (incremental_test_2): Likewise. (incremental_test_3): Likewise. (incremental_test_4): Likewise. (incremental_test_5): Likewise. (incremental_test_6): Likewise. (incremental_copy_test): Likewise. (incremental_common_test_1): Likewise. (incremental_comdat_test_1): Likewise. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/options.cc b/gold/options.cc
index 7f1f69e..39dc311 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -1256,6 +1256,8 @@ General_options::finalize()
"--emit-relocs"));
if (this->has_plugins())
gold_fatal(_("incremental linking is not compatible with --plugin"));
+ if (this->relro())
+ gold_fatal(_("incremental linking is not compatible with -z relro"));
if (this->gc_sections())
{
gold_warning(_("ignoring --gc-sections for an incremental link"));