diff options
author | Cary Coutant <ccoutant@gmail.com> | 2017-02-15 00:25:29 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2017-12-01 23:46:03 -0800 |
commit | 158600eb989bcbc364c6d18259f1cb32ea9dc478 (patch) | |
tree | 2e056287d85a96d63be8a078e21c6d32bfa8b7b5 /gold/incremental.cc | |
parent | 0af4ccfc5bc7ded4d87f813e3754486eb5a75349 (diff) | |
download | gdb-158600eb989bcbc364c6d18259f1cb32ea9dc478.zip gdb-158600eb989bcbc364c6d18259f1cb32ea9dc478.tar.gz gdb-158600eb989bcbc364c6d18259f1cb32ea9dc478.tar.bz2 |
Disallow --incremental with -pie and force -no-pie for incremental tests.
This is a partial fix for the gold testsuite failures documented in
PR 21090. The use of -fpie triggers some mov-to-lea optimizations that
are not compatible with incremental linking, so those optimizations need
to be disabled. We also diagnose the attempt to use -pie with incremental
linking, and force -no-pie for the incremental tests in case the build has
been configured to have GCC pass -pie all the time.
We still have a problem where compiling with -fpie results in some GOT
entries even when linking with -no-pie. This combination still causes test
failures because we are not updating the GOT entries in an incremental update
link.
gold/
PR gold/21090
* incremental.cc (Sized_relobj_incr::do_relocate): Fix comment.
* options.cc (General_options::finalize): Disallow -pie with
incremental linking.
* x86_64.cc (Target_x86_64::Scan::local): Don't do mov-to-lea
or callq-to-direct optimizations for incremental links.
(Target_x86_64::Scan::global): Likewise.
(Target_x86_64::Relocate::relocate): Likewise.
* testsuite/Makefile.am (incremental_test): Force -no-pie.
(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/incremental.cc')
-rw-r--r-- | gold/incremental.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc index 6d6b34a..8db7bc6 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -2536,8 +2536,8 @@ Sized_relobj_incr<size, big_endian>::do_set_local_dynsym_offset(off_t) // Relocate the input sections and write out the local symbols. // We don't actually do any relocation here. For unchanged input files, // we reapply relocations only for symbols that have changed; that happens -// in queue_final_tasks. We do need to rewrite the incremental relocations -// for this object. +// in Layout_task_runner::run(). We do need to rewrite the incremental +// relocations for this object. template<int size, bool big_endian> void |