diff options
author | Jiong Wang <jiong.wang@arm.com> | 2015-05-20 10:58:43 +0100 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2015-05-20 10:58:43 +0100 |
commit | ce336788820b5d04700cdb9ead2ade880f5e2caa (patch) | |
tree | 679548618049cd4c47c41b4d6d2852f515f9c64b /bfd/elfnn-aarch64.c | |
parent | f09c556a25af178e4fdedf76b653921b1aea5767 (diff) | |
download | gdb-ce336788820b5d04700cdb9ead2ade880f5e2caa.zip gdb-ce336788820b5d04700cdb9ead2ade880f5e2caa.tar.gz gdb-ce336788820b5d04700cdb9ead2ade880f5e2caa.tar.bz2 |
[AArch64/BFD] Sort relocation case labels alphabetically
2015-05-19 Jiong Wang <jiong.wang@arm.com>
bfd/
* elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
relocation case labels alphabetically.
(elfNN_aarch64_final_link_relocate): Ditto.
(elfNN_aarch64_tls_relax): Ditto.
(elfNN_aarch64_relocate_section): Ditto.
(elfNN_aarch64_gc_sweep_hook): Ditto.
(elfNN_aarch64_check_relocs): Ditto.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
(_bfd_aarch64_elf_resolve_relocation): Ditto.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r-- | bfd/elfnn-aarch64.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 1d896d4..725775d 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -3980,8 +3980,8 @@ aarch64_tls_transition_without_check (bfd_reloc_code_real_type r_type, switch (r_type) { - case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: + case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: return (is_local ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1 : BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21); @@ -3996,8 +3996,8 @@ aarch64_tls_transition_without_check (bfd_reloc_code_real_type r_type, ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1 : BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19); - case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC: + case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: return (is_local ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC : BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC); @@ -4033,29 +4033,29 @@ aarch64_reloc_got_type (bfd_reloc_code_real_type r_type) { switch (r_type) { - case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: - case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: case BFD_RELOC_AARCH64_ADR_GOT_PAGE: case BFD_RELOC_AARCH64_GOT_LD_PREL19: + case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: + case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: return GOT_NORMAL; + case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21: - case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: return GOT_TLS_GD; case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: 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_LD64_LO12_NC: case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: + case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: case BFD_RELOC_AARCH64_TLSDESC_LD_PREL19: return GOT_TLSDESC_GD; case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: - case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: + case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: return GOT_TLS_IE; @@ -4578,17 +4578,17 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, return bfd_reloc_ok; } /* FALLTHROUGH */ - case BFD_RELOC_AARCH64_JUMP26: case BFD_RELOC_AARCH64_CALL26: + case BFD_RELOC_AARCH64_JUMP26: value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, signed_addend, weak_undef_p); return _bfd_aarch64_elf_put_addend (input_bfd, hit_data, bfd_r_type, howto, value); - case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: - case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: case BFD_RELOC_AARCH64_ADR_GOT_PAGE: case BFD_RELOC_AARCH64_GOT_LD_PREL19: + case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: + case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: base_got = globals->root.sgot; off = h->got.offset; @@ -4650,8 +4650,8 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, 0, weak_undef_p); return _bfd_aarch64_elf_put_addend (input_bfd, hit_data, bfd_r_type, howto, value); - case BFD_RELOC_AARCH64_ADR_HI21_PCREL: case BFD_RELOC_AARCH64_ADD_LO12: + case BFD_RELOC_AARCH64_ADR_HI21_PCREL: break; } } @@ -4746,8 +4746,8 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value += signed_addend; break; - case BFD_RELOC_AARCH64_JUMP26: case BFD_RELOC_AARCH64_CALL26: + case BFD_RELOC_AARCH64_JUMP26: { asection *splt = globals->root.splt; bfd_boolean via_plt_p = @@ -4800,13 +4800,13 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, signed_addend, weak_undef_p); break; - case BFD_RELOC_AARCH64_ADR_LO21_PCREL: - case BFD_RELOC_AARCH64_ADR_HI21_PCREL: - case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: - case BFD_RELOC_AARCH64_LD_LO19_PCREL: case BFD_RELOC_AARCH64_16_PCREL: case BFD_RELOC_AARCH64_32_PCREL: case BFD_RELOC_AARCH64_64_PCREL: + case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: + case BFD_RELOC_AARCH64_ADR_HI21_PCREL: + case BFD_RELOC_AARCH64_ADR_LO21_PCREL: + case BFD_RELOC_AARCH64_LD_LO19_PCREL: if (info->shared && (input_section->flags & SEC_ALLOC) != 0 && (input_section->flags & SEC_READONLY) != 0 @@ -4830,30 +4830,30 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, #endif case BFD_RELOC_AARCH64_ADD_LO12: case BFD_RELOC_AARCH64_BRANCH19: - case BFD_RELOC_AARCH64_LDST8_LO12: + case BFD_RELOC_AARCH64_LDST128_LO12: case BFD_RELOC_AARCH64_LDST16_LO12: case BFD_RELOC_AARCH64_LDST32_LO12: case BFD_RELOC_AARCH64_LDST64_LO12: - case BFD_RELOC_AARCH64_LDST128_LO12: - case BFD_RELOC_AARCH64_MOVW_G0_S: - case BFD_RELOC_AARCH64_MOVW_G1_S: - case BFD_RELOC_AARCH64_MOVW_G2_S: + case BFD_RELOC_AARCH64_LDST8_LO12: case BFD_RELOC_AARCH64_MOVW_G0: case BFD_RELOC_AARCH64_MOVW_G0_NC: + case BFD_RELOC_AARCH64_MOVW_G0_S: case BFD_RELOC_AARCH64_MOVW_G1: case BFD_RELOC_AARCH64_MOVW_G1_NC: + case BFD_RELOC_AARCH64_MOVW_G1_S: case BFD_RELOC_AARCH64_MOVW_G2: case BFD_RELOC_AARCH64_MOVW_G2_NC: + case BFD_RELOC_AARCH64_MOVW_G2_S: case BFD_RELOC_AARCH64_MOVW_G3: case BFD_RELOC_AARCH64_TSTBR14: value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, signed_addend, weak_undef_p); break; - case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: - case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: case BFD_RELOC_AARCH64_ADR_GOT_PAGE: case BFD_RELOC_AARCH64_GOT_LD_PREL19: + case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: + case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: if (globals->root.sgot == NULL) BFD_ASSERT (h != NULL); @@ -4919,12 +4919,12 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, break; + case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21: - case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: - case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: + case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: if (globals->root.sgot == NULL) return bfd_reloc_notsupported; @@ -5008,8 +5008,8 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals, switch (elfNN_aarch64_bfd_reloc_from_type (r_type)) { - case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21: + case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: if (is_local) { /* GD->LE relaxation: @@ -5407,9 +5407,9 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, switch (elfNN_aarch64_bfd_reloc_from_type (r_type)) { + case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21: case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21: - case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: if (! symbol_got_offset_mark_p (input_bfd, h, r_symndx)) { bfd_boolean need_relocs = FALSE; @@ -5537,14 +5537,14 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, } break; - case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: + case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: - case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: - case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: - case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: + case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: + case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: + case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: break; case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: @@ -5961,13 +5961,13 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd, h->plt.refcount -= 1; break; + case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: + case BFD_RELOC_AARCH64_ADR_HI21_PCREL: + case BFD_RELOC_AARCH64_ADR_LO21_PCREL: case BFD_RELOC_AARCH64_MOVW_G0_NC: case BFD_RELOC_AARCH64_MOVW_G1_NC: case BFD_RELOC_AARCH64_MOVW_G2_NC: case BFD_RELOC_AARCH64_MOVW_G3: - case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: - case BFD_RELOC_AARCH64_ADR_HI21_PCREL: - case BFD_RELOC_AARCH64_ADR_LO21_PCREL: case BFD_RELOC_AARCH64_NN: if (h != NULL && info->executable) { @@ -6260,15 +6260,15 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, default: break; - case BFD_RELOC_AARCH64_NN: + case BFD_RELOC_AARCH64_ADD_LO12: + case BFD_RELOC_AARCH64_ADR_GOT_PAGE: + case BFD_RELOC_AARCH64_ADR_HI21_PCREL: case BFD_RELOC_AARCH64_CALL26: + case BFD_RELOC_AARCH64_GOT_LD_PREL19: case BFD_RELOC_AARCH64_JUMP26: case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC: case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: - case BFD_RELOC_AARCH64_ADR_GOT_PAGE: - case BFD_RELOC_AARCH64_GOT_LD_PREL19: - case BFD_RELOC_AARCH64_ADR_HI21_PCREL: - case BFD_RELOC_AARCH64_ADD_LO12: + case BFD_RELOC_AARCH64_NN: if (htab->root.dynobj == NULL) htab->root.dynobj = abfd; if (!_bfd_elf_create_ifunc_sections (htab->root.dynobj, info)) |