From cefdd1cd64f3b67aba1b219547b8f895c22d48ed Mon Sep 17 00:00:00 2001 From: Igor Kudrin Date: Mon, 28 Aug 2017 08:03:00 -0700 Subject: Fix bad offset calculation for R_AARCH64_TLSDESC_* relocs. If a custom linker script with an unexpected relative layout of .got and .got.plt sections was used, gold might produce a wrong offset when applying R_AARCH64_TLSDESC_* relocations. This patch fixes the issue by calculating "got_tlsdesc_offset" in a more direct way. gold/ * aarch64.cc (Target_aarch64::Relocate::relocate_tls): Make got_tlsdesc_offset signed and fix its calculation. * testsuite/Makefile.am (aarch64_tlsdesc): New test. * testsuite/Makefile.in: Regenerate. * testsuite/aarch64_tlsdesc.s: New test source file. * testsuite/aarch64_tlsdesc.sh: New test script. * testsuite/aarch64_tlsdesc.t: New test linker script. --- gold/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gold/ChangeLog') diff --git a/gold/ChangeLog b/gold/ChangeLog index d612f1d..7a1ea63 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,13 @@ +2017-08-28 Igor Kudrin + + * aarch64.cc (Target_aarch64::Relocate::relocate_tls): + Make got_tlsdesc_offset signed and fix its calculation. + * testsuite/Makefile.am (aarch64_tlsdesc): New test. + * testsuite/Makefile.in: Regenerate. + * testsuite/aarch64_tlsdesc.s: New test source file. + * testsuite/aarch64_tlsdesc.sh: New test script. + * testsuite/aarch64_tlsdesc.t: New test linker script. + 2017-08-28 Alan Modra PR 21847 -- cgit v1.1