diff options
author | Cary Coutant <ccoutant@gmail.com> | 2016-08-10 10:57:42 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2016-08-10 10:57:42 -0700 |
commit | f571390111e28717935ea1b6edd1afc902c5c61c (patch) | |
tree | eabaa67e4ca03f5ea2cc6fb8172ccb796ebdc140 /gold/x86_64.cc | |
parent | 2c00092dced3808ce4dcb76a9e7c473530dd01e8 (diff) | |
download | fsf-binutils-gdb-f571390111e28717935ea1b6edd1afc902c5c61c.zip fsf-binutils-gdb-f571390111e28717935ea1b6edd1afc902c5c61c.tar.gz fsf-binutils-gdb-f571390111e28717935ea1b6edd1afc902c5c61c.tar.bz2 |
Fix extraneous complaints about missing expected TLS relocation.
With some versions of gas, the call to tls_get_addr uses a GOTPCREL
relocation instead of a GOTPCRELX relocation. We should allow for that
when skip_call_tls_get_addr_ is true. We should also build the test
objects with the in-tree assembler.
This patch also fixes some cascading error messages caused by not
resetting the skip_call_tls_get_addr_ flag after printing the error.
gold/
PR gold/20216
* x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
error message.
* testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
(pr20216_ld.o): Likewise.
* testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r-- | gold/x86_64.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 6aa489a..8d494ea 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -3505,6 +3505,7 @@ Target_x86_64<size>::Relocate::relocate( if (this->skip_call_tls_get_addr_) { if ((r_type != elfcpp::R_X86_64_PLT32 + && r_type != elfcpp::R_X86_64_GOTPCREL && r_type != elfcpp::R_X86_64_GOTPCRELX && r_type != elfcpp::R_X86_64_PLT32_BND && r_type != elfcpp::R_X86_64_PC32_BND @@ -3514,6 +3515,7 @@ Target_x86_64<size>::Relocate::relocate( { gold_error_at_location(relinfo, relnum, rela.get_r_offset(), _("missing expected TLS relocation")); + this->skip_call_tls_get_addr_ = false; } else { |