diff options
author | Cary Coutant <ccoutant@gmail.com> | 2018-03-27 18:24:48 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2018-03-28 09:10:25 -0700 |
commit | e82e6b2b19eb796fed161b1658de6d5f763c18de (patch) | |
tree | 7dc6752f6cb55c5e168938ad438468396544f0cb /gold/aarch64.cc | |
parent | c39e5b267180a5d61a6434b24bcc7888bf3c0ca7 (diff) | |
download | gdb-e82e6b2b19eb796fed161b1658de6d5f763c18de.zip gdb-e82e6b2b19eb796fed161b1658de6d5f763c18de.tar.gz gdb-e82e6b2b19eb796fed161b1658de6d5f763c18de.tar.bz2 |
Add support for R_AARCH64_TLSLE_LDST8_TPREL_LO12, etc.
elfcpp/
PR gold/22969
* aarch64.h: Fix spelling of R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC.
gold/
PR gold/22969
* aarch64-reloc.def: Add TLSLE_LDST* relocations.
* aarch64.cc (Target_aarch64::optimize_tls_reloc): Likewise.
(Target_aarch64::Scan::local): Likewise.
(Target_aarch64::Scan::global): Likewise.
(Target_aarch64::Relocate::relocate): Likewise.
(Target_aarch64::Relocate::relocate_tls): Likewise.
Diffstat (limited to 'gold/aarch64.cc')
-rw-r--r-- | gold/aarch64.cc | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/gold/aarch64.cc b/gold/aarch64.cc index 1abdb27..ecb400b 100644 --- a/gold/aarch64.cc +++ b/gold/aarch64.cc @@ -5916,6 +5916,14 @@ Target_aarch64<size, big_endian>::optimize_tls_reloc(bool is_final, case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC: // When we already have Local-Exec, there is nothing further we // can do. return tls::TLSOPT_NONE; @@ -6262,6 +6270,14 @@ Target_aarch64<size, big_endian>::Scan::local( case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC: { layout->set_has_static_tls(); bool output_is_shared = parameters->options().shared(); @@ -6679,7 +6695,15 @@ Target_aarch64<size, big_endian>::Scan::global( case elfcpp::R_AARCH64_TLSLE_MOVW_TPREL_G0_NC: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12: - case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: // Local executable + case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC: // Local executable layout->set_has_static_tls(); if (parameters->options().shared()) gold_error(_("%s: unsupported TLSLE reloc type %u in shared objects."), @@ -7276,6 +7300,14 @@ Target_aarch64<size, big_endian>::Relocate::relocate( case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC: case elfcpp::R_AARCH64_TLSDESC_ADR_PAGE21: case elfcpp::R_AARCH64_TLSDESC_LD64_LO12: case elfcpp::R_AARCH64_TLSDESC_ADD_LO12: @@ -7555,6 +7587,14 @@ Target_aarch64<size, big_endian>::Relocate::relocate_tls( case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_HI12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12: case elfcpp::R_AARCH64_TLSLE_ADD_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12: + case elfcpp::R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC: { gold_assert(tls_segment != NULL); AArch64_address value = psymval->value(object, 0); |