From 9e756d64bb2d21ed9838a849d06305bc307bdfa0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 2 Jun 2002 02:28:45 +0000 Subject: include/elf/ * alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF, LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New. gas/ * config/tc-alpha.c: Move LITUSE constants to "elf/alpha.h". Rename them LITUSE_ALPHA_*. bfd/ * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New. (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs in shared libraries. Fix DTPRELHI and TPRELHI value. (INSN_ADDQ, INSN_RDUNIQ): New. (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent. (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend argument. Reject dynamic symbols. Use LITUSE symbolic constants. (elf64_alpha_relax_got_load): Rename from relax_without_lituse. Handle GOTDTPREL and GOTTPREL relocations. (elf64_alpha_relax_gprelhilo): New. (elf64_alpha_relax_tls_get_addr): New. (elf64_alpha_relax_find_tls_segment): New. (elf64_alpha_relax_section): Handle TLS relocations. (ALPHA_ELF_LINK_HASH_TLS_IE): New. (elf64_alpha_check_relocs): Set it. --- gas/config/tc-alpha.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index 1ba7aca..dec4db4 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -137,13 +137,6 @@ struct alpha_macro { #define DUMMY_RELOC_LITUSE_TLSGD (BFD_RELOC_UNUSED + 5) #define DUMMY_RELOC_LITUSE_TLSLDM (BFD_RELOC_UNUSED + 6) -#define LITUSE_ADDR 0 -#define LITUSE_BASE 1 -#define LITUSE_BYTOFF 2 -#define LITUSE_JSR 3 -#define LITUSE_TLSGD 4 -#define LITUSE_TLSLDM 5 - #define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_tprel) /* Macros for extracting the type and number of encoded register tokens */ @@ -1758,14 +1751,14 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) as_bad_where (fixp->fx_file, fixp->fx_line, _("No !literal!%ld was found"), fixp->tc_fix_data.info->sequence); - if (fixp->fx_offset == LITUSE_TLSGD) + if (fixp->fx_offset == LITUSE_ALPHA_TLSGD) { if (! fixp->tc_fix_data.info->saw_tlsgd) as_bad_where (fixp->fx_file, fixp->fx_line, _("No !tlsgd!%ld was found"), fixp->tc_fix_data.info->sequence); } - else if (fixp->fx_offset == LITUSE_TLSLDM) + else if (fixp->fx_offset == LITUSE_ALPHA_TLSLDM) { if (! fixp->tc_fix_data.info->saw_tlsldm) as_bad_where (fixp->fx_file, fixp->fx_line, @@ -2686,22 +2679,22 @@ emit_insn (insn) break; case DUMMY_RELOC_LITUSE_ADDR: - fixP->fx_offset = LITUSE_ADDR; + fixP->fx_offset = LITUSE_ALPHA_ADDR; goto do_lituse; case DUMMY_RELOC_LITUSE_BASE: - fixP->fx_offset = LITUSE_BASE; + fixP->fx_offset = LITUSE_ALPHA_BASE; goto do_lituse; case DUMMY_RELOC_LITUSE_BYTOFF: - fixP->fx_offset = LITUSE_BYTOFF; + fixP->fx_offset = LITUSE_ALPHA_BYTOFF; goto do_lituse; case DUMMY_RELOC_LITUSE_JSR: - fixP->fx_offset = LITUSE_JSR; + fixP->fx_offset = LITUSE_ALPHA_JSR; goto do_lituse; case DUMMY_RELOC_LITUSE_TLSGD: - fixP->fx_offset = LITUSE_TLSGD; + fixP->fx_offset = LITUSE_ALPHA_TLSGD; goto do_lituse; case DUMMY_RELOC_LITUSE_TLSLDM: - fixP->fx_offset = LITUSE_TLSLDM; + fixP->fx_offset = LITUSE_ALPHA_TLSLDM; goto do_lituse; do_lituse: fixP->fx_addsy = section_symbol (now_seg); -- cgit v1.1