diff options
author | Nick Clifton <nickc@redhat.com> | 2017-03-13 09:58:04 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-03-13 09:58:04 +0000 |
commit | f955cccff399ccc4e16b8e90f140f2e9a785a07b (patch) | |
tree | 0e29d41c5217fb0e4ebebed6b54aed12a5c994ee /bfd | |
parent | d40e34db392f834793fb9af487121776b4cec6e7 (diff) | |
download | gdb-f955cccff399ccc4e16b8e90f140f2e9a785a07b.zip gdb-f955cccff399ccc4e16b8e90f140f2e9a785a07b.tar.gz gdb-f955cccff399ccc4e16b8e90f140f2e9a785a07b.tar.bz2 |
Rename R_AARCH64_TLSDESC_LD64_LO12_NC to R_AARCH64_TLSDESC_LD64_LO12 and R_AARCH64_TLSDESC_ADD_LO12_NC to R_AARCH64_TLSDESC_ADD_LO12.
PR binutils/21202
include * elf/aarch64.h (R_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
R_AARCH64_TLSDESC_LD64_LO12.
(R_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
R_AARCH64_TLSDESC_ADD_LO12_NC.
bfd * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
(BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
names.
(IS_AARCH64_TLSDESC_RELOC): Likewise.
(elfNN_aarch64_howto_table): Likewise.
(aarch64_tls_transition_without_check): Likewise.
(aarch64_reloc_got_type): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_tls_relax): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.
gas * config/tc-aarch64.c (reloc_table): Rename
BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC to
BFD_RELOC_AARCH64_TLSDESC_LD64_LO12. Rname
BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC to
BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
(md_apply_fix): Likewise.
(aarch64_force_relocation): Likewise.
* testsuite/gas/aarch64/tls.d: Update regexp.
ld * testsuite/ld-aarch64/ifunc-5r-local.d: Update regexp.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 23 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 4 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 45 | ||||
-rw-r--r-- | bfd/elfxx-aarch64.c | 8 | ||||
-rw-r--r-- | bfd/libbfd.h | 4 | ||||
-rw-r--r-- | bfd/reloc.c | 4 |
6 files changed, 57 insertions, 31 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 277e552..664285b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,26 @@ +2017-03-13 Nick Clifton <nickc@redhat.com> + + PR binutils/21202 + * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12. + (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc + names. + (IS_AARCH64_TLSDESC_RELOC): Likewise. + (elfNN_aarch64_howto_table): Likewise. + (aarch64_tls_transition_without_check): Likewise. + (aarch64_reloc_got_type): Likewise. + (elfNN_aarch64_final_link_relocate): Likewise. + (elfNN_aarch64_tls_relax): Likewise. + (elfNN_aarch64_relocate_section): Likewise. + (elfNN_aarch64_gc_sweep_hook): Likewise. + (elfNN_aarch64_check_relocs): Likewise. + * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. + (_bfd_aarch64_elf_resolve_relocation): Likewise. + 2017-03-11 Alan Modra <amodra@gmail.com> * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 0a4a044..59403af 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -6156,13 +6156,13 @@ instructions. */ BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, /* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, /* AArch64 TLS DESC relocation. */ BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, /* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, /* AArch64 TLS DESC relocation. */ BFD_RELOC_AARCH64_TLSDESC_OFF_G1, diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index dfba7f7..710e2c3 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -154,6 +154,7 @@ #define HOWTO64(...) HOWTO (__VA_ARGS__) #define HOWTO32(...) EMPTY_HOWTO (0) #define LOG_FILE_ALIGN 3 +#define BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC BFD_RELOC_AARCH64_TLSDESC_LD64_LO12 #endif #if ARCH_SIZE == 32 @@ -162,6 +163,8 @@ #define HOWTO64(...) EMPTY_HOWTO (0) #define HOWTO32(...) HOWTO (__VA_ARGS__) #define LOG_FILE_ALIGN 2 +#define BFD_RELOC_AARCH64_TLSDESC_LD32_LO12 BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC +#define R_AARCH64_P32_TLSDESC_ADD_LO12 R_AARCH64_P32_TLSDESC_ADD_LO12_NC #endif #define IS_AARCH64_TLS_RELOC(R_TYPE) \ @@ -209,8 +212,8 @@ || IS_AARCH64_TLSDESC_RELOC ((R_TYPE))) #define IS_AARCH64_TLS_RELAX_RELOC(R_TYPE) \ - ((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD \ - || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC \ + ((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD \ + || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_CALL \ @@ -235,12 +238,12 @@ #define IS_AARCH64_TLSDESC_RELOC(R_TYPE) \ ((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD \ - || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC \ + || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_CALL \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC \ - || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC \ + || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD64_LO12 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LDR \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD_PREL19 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC \ @@ -1569,7 +1572,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = TRUE), /* pcrel_offset */ /* LD64: GOT offset G(S) & 0xff8. */ - HOWTO64 (AARCH64_R (TLSDESC_LD64_LO12_NC), /* type */ + HOWTO64 (AARCH64_R (TLSDESC_LD64_LO12), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ @@ -1577,7 +1580,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - AARCH64_R_STR (TLSDESC_LD64_LO12_NC), /* name */ + AARCH64_R_STR (TLSDESC_LD64_LO12), /* name */ FALSE, /* partial_inplace */ 0xff8, /* src_mask */ 0xff8, /* dst_mask */ @@ -1599,15 +1602,15 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = FALSE), /* pcrel_offset */ /* ADD: GOT offset G(S) & 0xfff. */ - HOWTO (AARCH64_R (TLSDESC_ADD_LO12_NC), /* type */ + HOWTO (AARCH64_R (TLSDESC_ADD_LO12), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_dont, /* complain_on_overflow */ + complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - AARCH64_R_STR (TLSDESC_ADD_LO12_NC), /* name */ + AARCH64_R_STR (TLSDESC_ADD_LO12), /* name */ FALSE, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ @@ -4474,7 +4477,7 @@ aarch64_tls_transition_without_check (bfd_reloc_code_real_type r_type, : BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19); case BFD_RELOC_AARCH64_TLSDESC_ADD: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_CALL: /* Instructions with these relocations will become NOPs. */ return BFD_RELOC_AARCH64_NONE; @@ -4530,12 +4533,12 @@ aarch64_reloc_got_type (bfd_reloc_code_real_type r_type) return GOT_TLS_GD; case BFD_RELOC_AARCH64_TLSDESC_ADD: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: case BFD_RELOC_AARCH64_TLSDESC_CALL: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: - case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: case BFD_RELOC_AARCH64_TLSDESC_LDR: case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: @@ -5577,11 +5580,11 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, *unresolved_reloc_p = FALSE; break; - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: - case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: if (globals->root.sgot == NULL) return bfd_reloc_notsupported; @@ -5908,7 +5911,7 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals, } case BFD_RELOC_AARCH64_TLSDESC_ADD: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_CALL: /* GD->IE/LE relaxation: add x0, x0, #:tlsdesc_lo12:var => nop @@ -6385,7 +6388,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, } break; - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC: @@ -6792,11 +6795,11 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd, case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC: case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: - case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: case BFD_RELOC_AARCH64_TLSDESC_OFF_G1: @@ -7294,11 +7297,11 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC: case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: - case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: case BFD_RELOC_AARCH64_TLSDESC_OFF_G1: @@ -8881,7 +8884,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd, || plt == NULL || gotplt == NULL || relplt == NULL) - abort (); + return FALSE; elfNN_aarch64_create_small_pltn_entry (h, htab, output_bfd, info); if (!h->def_regular) diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 1c5c72a..6c61ec6 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -247,7 +247,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd, break; case BFD_RELOC_AARCH64_ADD_LO12: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12: case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12: @@ -274,7 +274,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd, case BFD_RELOC_AARCH64_LDST64_LO12: case BFD_RELOC_AARCH64_LDST8_LO12: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: - case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12: @@ -483,9 +483,9 @@ _bfd_aarch64_elf_resolve_relocation (bfd_reloc_code_real_type r_type, case BFD_RELOC_AARCH64_LDST64_LO12: case BFD_RELOC_AARCH64_LDST8_LO12: case BFD_RELOC_AARCH64_TLSDESC_ADD: - case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: - case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12: case BFD_RELOC_AARCH64_TLSDESC_LDR: case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: diff --git a/bfd/libbfd.h b/bfd/libbfd.h index bf5f355..1b6ca52 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -2939,9 +2939,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_AARCH64_TLSDESC_LD_PREL19", "BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21", "BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21", - "BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC", + "BFD_RELOC_AARCH64_TLSDESC_LD64_LO12", "BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC", - "BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC", + "BFD_RELOC_AARCH64_TLSDESC_ADD_LO12", "BFD_RELOC_AARCH64_TLSDESC_OFF_G1", "BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC", "BFD_RELOC_AARCH64_TLSDESC_LDR", diff --git a/bfd/reloc.c b/bfd/reloc.c index 16ec5cd..d4229a4 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -7316,7 +7316,7 @@ ENUM ENUMDOC AArch64 TLS DESC relocation. ENUM - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12 ENUMDOC AArch64 TLS DESC relocation. ENUM @@ -7324,7 +7324,7 @@ ENUM ENUMDOC AArch64 TLS DESC relocation. ENUM - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12 ENUMDOC AArch64 TLS DESC relocation. ENUM |