Ben Elliston
1a9a8ab429
Remove redundant returns in void functions.
2003-12-10 06:41:08 +00:00
H.J. Lu
b80901c73f
2003-11-24 H.J. Lu <hongjiu.lu@intel.com>
...
* config/tc-alpha.c (s_alpha_end): Don't crash if there is no
matching .ent.
2003-12-04 00:54:16 +00:00
Kazu Hirata
2d2255b58e
* config/tc-a29k.h: Fix comment typos.
...
* config/tc-alpha.c: Likewise.
* config/tc-alpha.h: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-arm.h: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-d30v.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-dlx.h: Likewise.
2003-11-21 00:24:40 +00:00
Richard Henderson
f4b97536ed
* config/tc-alpha.c (s_alpha_usepv): New.
...
(md_pseudo_table): Add it.
(alpha_cfi_frame_initial_instructions): New.
* config/tc-alpha.h (TARGET_USE_CFIPOP): New.
(tc_cfi_frame_initial_instructions): New.
* doc/c-alpha.texi: Document .usepv.
* gas/alpha/elf-usepv-1.[sd]: New.
* gas/alpha/elf-usepv-2.[sd]: New.
* gas/alpha/alpha.exp: Run them.
* gas/cfi/cfi-alpha-3.[sd]: New.
* gas/cfi/cfi.exp: Run it.
2003-06-05 03:27:03 +00:00
Richard Henderson
f37f01cff7
* config/tc-alpha.c (alpha_cur_ent_sym): Remove.
...
(all_frame_data, plast_frame_data, cur_frame_data): New.
(s_alpha_ent): Record data for dwarf2 cfi.
(s_alpha_end, s_alpha_mask, s_alpha_frame, s_alpha_prologue): Likewise.[
(alpha_elf_md_end): Emit dwarf2 cfi for ecoff unwind directives.
* config/tc-alpha.h (md_end): New.
(DWARF2_DEFAULT_RETURN_COLUMN): New.
(DWARF2_CIE_DATA_ALIGNMENT): New.
* gas/alpha/elf-reloc-8.d: Add .eh_frame relocs.
* gas/cfi/cfi-alpha-1.d: New.
* gas/cfi/cfi-alpha-1.s: New.
* gas/cfi/cfi.exp: Run it.
2003-05-30 03:01:12 +00:00
H.J. Lu
711ef82f1d
gas/
...
2003-05-03 H.J. Lu <hjl@gnu.org>
* config/obj-elf.c (obj_elf_parse_section_letters): Make it a
fatal error for unknown section attribute.
* config/tc-alpha.c (alpha_elf_section_letter): Return -1 for
unknown section attribute.
* config/tc-ia64.c (ia64_elf_section_letter): Likewise.
* config/tc-ppc.c (ppc_section_letter): Likewise.
* config/tc-ia64.c (ia64_elf_section_letter): Handle 'o'.
(ia64_elf_section_type): Accept "unwind".
gas/testsuite/
2003-05-03 H.J. Lu <hjl@gnu.org>
* gas/ia64/ia64.exp: Add unwind.
* gas/ia64/unwind.s: New. Test the new section attribute 'o'
and the new section type "unwind".
* gas/ia64/unwind.d: Likewise.
2003-05-03 16:04:12 +00:00
H.J. Lu
83b5ab55b3
2003-05-02 H.J. Lu <hjl@gnu.org>
...
* read.h (demand_copy_string): New.
* config/tc-alpha.c (demand_copy_string): Removed.
2003-05-03 06:10:59 +00:00
Alan Modra
ae6063d440
* symbols.c (S_FORCE_RELOC): Add "strict" param.
...
* symbols.h (S_FORCE_RELOC): Likewise.
* config/obj-aout.h (S_FORCE_RELOC): Likewise.
* config/obj-bout.h (S_FORCE_RELOC): Likewise.
* config/obj-coff.h (S_FORCE_RELOC): Likewise.
* config/obj-ieee.h (S_FORCE_RELOC): Likewise.
* config/obj-vms.h (S_FORCE_RELOC): Likewise.
* write.c (generic_force_reloc): New function.
(TC_FORCE_RELOCATION): Use it here instead of S_FORCE_RELOC.
(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
(adjust_reloc_syms): Adjust S_FORCE_RELOC call.
* as.h (generic_force_reloc): Declare.
* doc/internals.texi (S_FORCE_RELOC): Update.
(TC_FORCE_RELOCATION_SUB_SAME): Update.
* config/tc-alpha.c (alpha_force_relocation): Adjust to use
generic_force_reloc.
(alpha_fix_adjustable): Likewise.
* config/tc-arm.c (arm_force_relocation): Likewise.
* config/tc-cris.c (md_cris_force_relocation): Likewise.
* config/tc-frv.c (frv_force_relocation): Likewise.
* config/tc-i386.c (md_apply_fix3): Likewise.
* config/tc-ia64.c (ia64_force_relocation): Likewise.
* config/tc-ip2k.c (ip2k_force_relocation): Likewise.
* config/tc-m32r.c (m32r_force_relocation): Likewise.
* config/tc-m68hc11.c (tc_m68hc11_force_relocation): Likewise.
* config/tc-mcore.c (mcore_force_relocation): Likewise.
* config/tc-mips.c (mips_force_relocation): Likewise.
* config/tc-mmix.c (mmix_force_relocation): Likewise.
* config/tc-ppc.c (ppc_force_relocation): Likewise.
* config/tc-s390.c (tc_s390_force_relocation): Likewise.
* config/tc-sh.c (sh_force_relocation): Likewise.
(md_pcrel_from_section): Likewise.
* config/tc-sparc.c (tc_gen_reloc): Likewise.
* config/tc-v850.c (v850_force_relocation): Likewise.
* config/tc-xstormy16.c (xstormy16_force_relocation): Likewise.
* config/tc-i386.h (TC_FORCE_RELOCATION): Likewise.
* config/tc-mcore.h (TC_FORCE_RELOCATION): Likewise.
* config/tc-sparc.h (tc_fix_adjustable): Likewise.
* config/tc-d10v.c (d10v_force_relocation): Delete.
* config/tc-d10v.h (TC_FORCE_RELOCATION): Don't define.
* config/tc-dlx.c (md_dlx_force_relocation): Delete.
* config/tc-dlx.h (TC_FORCE_RELOCATION): Don't define.
* config/tc-fr30.c (fr30_force_relocation): Delete.
* config/tc-fr30.h (TC_FORCE_RELOCATION): Don't define.
* config/tc-mn10300.c (mn10300_force_relocation): Delete.
* config/tc-mn10300.h (TC_FORCE_RELOCATION): Don't define.
(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
* config/tc-i960.h (TC_FORCE_RELOCATION_SUB_SAME): Likewise.
* config/tc-hppa.c (hppa_force_relocation): Adjust S_FORCE_RELOC call.
* config/tc-mips.c (RELAX_BRANCH_TOOFAR): Warning fix.
* config/tc-mips.h (TC_FORCE_RELOCATION_SUB_SAME): Don't define.
* config/tc-openrisc.c (openrisc_force_relocation): Delete.
* config/tc-openrisc.h (TC_FORCE_RELOCATION): Don't define.
* config/tc-sparc.c (elf32_sparc_force_relocation): Delete.
* config/tc-sparc.h (TC_FORCE_RELOCATION): Don't define for ELF.
* config/tc-i386.c (i386_force_relocation): Delete.
* config/tc-i386.h (TC_FORCE_RELOCATION): Don't define for
BFD_ASSEMBLER.
(EXTERN_FORCE_RELOC): Fix TE_PE and STRICT_PE_FORMAT nesting.
* config/tc-m68k.h (TC_FORCE_RELOCATION): Don't define.
* config/tc-pj.h (TC_FORCE_RELOCATION): Don't define.
* config/tc-sh.h (TC_FORCE_RELOCATION_SUB_ABS): Don't call
S_FORCE_RELOC.
(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
* config/tc-sh64.h (TC_FORCE_RELOCATION_SUB_SAME): Likewise.
2003-01-23 12:51:05 +00:00
Nick Clifton
2469cfa284
Add support for msp430.
2002-12-30 19:25:13 +00:00
Jakub Jelinek
00f7efb6cc
* symbols.c (S_SET_THREAD_LOCAL): New function.
...
* symbols.h (S_SET_THREAD_LOCAL): New prototype.
* config/tc-i386.c (md_apply_fix3): Call S_SET_THREAD_LOCAL
for TLS relocations.
* config/tc-ia64.c (md_apply_fix3): Likewise.
* config/tc-alpha.c (md_apply_fix3): Likewise.
* ld-i386/tlsnopic.rd: Change NOTYPE to TLS for UND sg* symbols.
2002-11-28 14:15:55 +00:00
Richard Henderson
33bf47a8fe
* config/tc-alpha.c (alpha_fix_adjustable): Remove redundant
...
S_IS_DEFINED test.
2002-11-21 18:56:06 +00:00
Alan Modra
81283cde50
* config/tc-alpha.c (s_alpha_prologue): as_bad when sym is NULL.
2002-11-19 07:32:28 +00:00
Richard Henderson
66ba4c770b
* config/tc-alpha.c (alpha_validate_fix): Move code ...
...
(alpha_fix_adjustable): ... here.
* config/tc-alpha.h (TC_VALIDATE_FIX): Remove.
2002-11-07 00:42:19 +00:00
Richard Henderson
021c2b5e4b
* config/tc-alpha.c (md_pcrel_from): Only adjust special for
...
branch type relocs.
(alpha_force_relocation): Don't special-case branch type relocs.
* gas/alpha/elf-reloc-7.s: New.
* gas/alpha/elf-reloc-7.d: New.
* gas/alpha/alpha.exp: Run it.
2002-09-19 16:13:38 +00:00
Alan Modra
a161fe5320
gas reloc rewrite.
2002-09-05 00:01:18 +00:00
Nick Clifton
11f45fb5ff
Fix compiling for COFF targets.
...
Some minor formatting tidyups.
2002-08-14 13:27:06 +00:00
Richard Henderson
dbac4f5ba8
* config/tc-alpha.c (cpu_types): Enabled ev67, ev68, -m21264a
...
and m21264b processor names and cpu types.
* doc/c-alpha.texi: Documented new types.
2002-08-06 22:06:08 +00:00
Richard Henderson
20e130e9c0
* config/tc-alpha.c (alpha_adjust_symtab_relocs): Fix thinko
...
with LITERALs without sequence numbers.
2002-06-02 08:36:10 +00:00
Richard Henderson
9e756d64bb
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.
2002-06-02 02:28:45 +00:00
Richard Henderson
3765b1be13
include/elf/
...
* alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64,
R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI,
R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64,
R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New.
bfd/
* elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
(ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
(ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
(struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
(struct alpha_elf_obj_tdata): Rename total_got_entries and
n_local_got_entries to total_got_size and local_got_size.
(elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
(alpha_got_entry_size): New.
(elf64_alpha_relax_with_lituse): Use it.
(elf64_alpha_relax_without_lituse): Likewise.
(MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
(get_got_entry): New.
(elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
(elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
(elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
(elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
(elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
(elf64_alpha_calc_got_offsets): Likewise.
(alpha_dynamic_entries_for_reloc): New.
(elf64_alpha_calc_dynrel_sizes): Use it.
(elf64_alpha_size_dynamic_sections): Likewise.
(elf64_alpha_relocate_section): Handle TLS relocations.
* reloc.c: Add Alpha TLS relocations.
* bfd-in2.h, libbfd.h: Rebuild.
gas/
* expr.h (operatorT): Add O_md17..O_md32.
* config/tc-alpha.c (O_lituse_tlsgd, O_lituse_tlsldm, O_tlsgd,
O_tlsldm, O_gotdtprel, O_dtprelhi, O_dtprello, O_dtprel, O_gottprel,
O_tprelhi, O_tprello, O_tprel): New.
(USER_RELOC_P, alpha_reloc_op_tag, debug_exp): Include them.
(DUMMY_RELOC_LITUSE_TLSGD, DUMMY_RELOC_LITUSE_TLSLDM): New.
(LITUSE_TLSGD, LITUSE_TLSLDM): New.
(struct alpha_reloc_tag): Add master, saw_tlsgd, saw_tlsld,
saw_lu_tlsgd, saw_lu_tlsldm. Make multi_section_p a bit field.
(md_apply_fix3): Handle TLS relocations.
(alpha_force_relocation, alpha_fix_adjustable): Likewise.
(alpha_adjust_symtab_relocs): Sort LITERAL relocs after the
associated TLS reloc. Check lituse_tls relocs match up.
(emit_insn): Handle TLS relocations.
(ldX_op): Remove.
gas/testsuite/
* gas/alpha/elf-tls-1.s, gas/alpha/elf-tls-1.d: New.
* gas/alpha/elf-tls-2.s, gas/alpha/elf-tls-1.l: New.
* gas/alpha/elf-tls-3.s, gas/alpha/elf-tls-1.l: New.
* gas/alpha/alpha.exp: Run them.
2002-05-30 22:01:38 +00:00
Jakub Jelinek
13ae64f3c7
* elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
...
for symbols from SHF_TLS section.
(_bfd_elf_print_private_bfd_data): Add PT_TLS.
(elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
(map_sections_to_segments): Build PT_TLS segment if necessary.
(assign_file_positions_for_segments): Likewise.
(get_program_header_size): Account for PT_TLS segment.
(swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
SEC_THREAD_LOCAL sections to STT_TLS.
* reloc.c: Add 386 and IA-64 TLS relocs.
* section.c (SEC_THREAD_LOCAL): Define.
(SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
Remove.
* elflink.h (elf_link_add_object_symbols): Support .tcommon.
(size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
unconditionally.
(struct elf_final_link_info): Add first_tls_sec.
(elf_bfd_final_link): Set first_tls_sec.
Compute elf_hash_table (info)->tls_segment.
(elf_link_output_extsym): Handle STT_TLS symbols.
(elf_link_input_bfd): Likewise.
* syms.c (BSF_THREAD_LOCAL): Define.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
elf_i386_mkobject, elf_i386_object_p): New functions.
(elf_howto_table): Add TLS relocs.
(elf_i386_reloc_type_lookup): Support TLS relocs.
(elf_i386_info_to_howto_rel): Likewise.
(struct elf_i386_link_hash_entry): Add tls_type.
(struct elf_i386_obj_tdata): New.
(elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
New macros.
(struct elf_i386_link_hash_table): Add tls_ldm_got.
(link_hash_newfunc): Clear tls_type.
(elf_i386_check_relocs): Support TLS relocs.
(elf_i386_gc_sweep_hook): Likewise.
(allocate_dynrelocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_finish_dynamic_symbol): Likewise.
(bfd_elf32_mkobject, elf_backend_object_p): Define.
* elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
want_tprel, want_dtpmod, want_dtprel.
(elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
(ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
R_IA64_LTOFF_TPREL22.
(elf_code_to_howto_index): Add TLS relocs.
(elfNN_ia64_check_relocs): Support TLS relocs.
(allocate_global_data_got): Account for TLS .got data.
(allocate_dynrel_entries): Account for TLS dynamic relocations.
(elfNN_ia64_install_value): Supprt TLS relocs.
(set_got_entry): Support TLS relocs.
(elfNN_ia64_relocate_section): Likewise.
* config/obj-elf.c (elf_common): Renamed from obj_elf_common.
(obj_elf_common): Call elf_common.
(obj_elf_tls_common): New function.
(elf_pseudo_tab): Support .tls_common.
(special_sections): Add .tdata and .tbss.
(obj_elf_change_section): Set SEC_THREAD_LOCAL for SHF_TLS
sections.
(obj_elf_parse_section_letters): Support T in section flags (SHF_TLS).
(obj_elf_parse_section_letters): Include T in error message.
* config/tc-ppc.c (ppc_section_letter): Likewise.
* config/tc-alpha.c (alpha_elf_section_letter): Likewise.
(tc_gen_reloc): Handle SEC_THREAD_LOCAL the same way as
SEC_MERGE.
* config/tc-sparc.c (md_apply_fix3): Likewise.
* config/tc-i386.c (tc_i386_fix_adjustable): Add TLS relocs.
Define them if not BFD_ASSEMBLER.
(lex_got): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF, @DTPOFF
and @NTPOFF.
(md_apply_fix3): Add TLS relocs.
* config/tc-ia64.c (enum reloc_func): Add FUNC_DTP_MODULE,
FUNC_DTP_RELATIVE, FUNC_TP_RELATIVE, FUNC_LT_DTP_MODULE,
FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE.
(pseudo_func): Support @dtpmod(), @dtprel() and @tprel().
(ia64_elf_section_letter): Include T in error message.
(md_begin): Support TLS operators.
(md_operand): Likewise.
(ia64_gen_real_reloc_type): Support TLS relocs.
* testsuite/gas/i386/tlspic.s: New file.
* testsuite/gas/i386/tlsd.s: New file.
* testsuite/gas/i386/tlsnopic.s: New file.
* testsuite/gas/i386/tlsd.d: New file.
* testsuite/gas/i386/tlsnopic.d: New file.
* testsuite/gas/i386/tlspic.d: New file.
* testsuite/gas/i386/i386.exp: Add tlsd, tlsnopic and tlspic tests.
* testsuite/gas/ia64/tls.s: New file.
* testsuite/gas/ia64/tls.d: New file.
* testsuite/gas/ia64/ia64.exp: Add tls test.
* write.c (adjust_reloc_syms): Don't change symbols in
SEC_THREAD_LOCAL sections to STT_SECTION + addend.
* elf/common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define.
* elf/ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22.
* elf/i386.h: Add TLS relocs.
* scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
* ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
output section if necessary. Handle .tbss.
(lang_size_sections): Clear _raw_size for .tbss section
(it allocates space in PT_TLS segment only).
* ldwrite.c (build_link_order): Build link order for .tbss too.
* readelf.c (get_segment_type): Add PT_TLS.
(get_elf_section_flags): Add SHF_TLS.
(get_dynamic_flags): Optimize. Add DF_STATIC_TLS.
(process_dynamic_segment): Use puts instead of printf.
(get_symbol_type): Support STT_TLS.
* objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT,
SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS.
Add SEC_THREAD_LOCAL.
2002-05-23 13:12:53 +00:00
Alan Modra
69108c1f43
* config/tc-alpha.c (assemble_tokens): Protect use of
...
ALPHA_RELOC_TABLE with #ifdef RELOC_OP_P.
2002-05-23 10:12:04 +00:00
Kazu Hirata
cc8a6dd09b
* config/obj-coff.c: Fix formatting.
...
* config/obj-elf.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-d30v.c: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-hppa.c: Likewise.
2002-05-09 13:12:57 +00:00
Jakub Jelinek
559e22f3dd
* config/tc-alpha.c (s_alpha_text): Use obj_elf_text for OBJ_ELF, not
...
s_text.
(s_alpha_data): Use obj_elf_data for OBJ_ELF, not s_data.
2002-02-27 23:48:06 +00:00
Richard Henderson
543833df4f
* config/tc-alpha.c (O_samegp): New.
...
(USER_RELOC_P): Include it.
(alpha_reloc_op_tag, debug_exp, find_macro_match): Add it.
(md_apply_fix3): Handle BFD_RELOC_ALPHA_BRSGP.
(alpha_force_relocation, alpha_fix_adjustable): Likewise.
(alpha_validate_fix): New.
* config/tc-alpha.h (TC_VALIDATE_FIX): New.
* gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New.
* gas/alpha/elf-reloc-6.s, gas/alpha/elf-reloc-6.l: New.
* gas/alpha/alpha.exp: Run them.
2002-02-09 22:55:06 +00:00
Richard Henderson
50a4c61130
* config/tc-alpha.c (alpha_force_relocation): Don't assert that
...
we've eliminated all foreign relocation types yet.
(alpha_fix_adjustable): Likewise.
2002-02-08 10:03:01 +00:00
Richard Henderson
84b229ef24
* config/tc-alpha.c (alpha_handle_align): Encode unop with RB as $sp.
2001-12-18 00:24:47 +00:00
Jakub Jelinek
f7460f5f76
* elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
...
(elf64_alpha_relocate_section): Translate local_got_entries
for STT_SECTION symbol to SHF_MERGE section the first time
we see it.
* elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
sec_merge_done.
(get_local_sym_hash): New, extracted from get_dyn_sym_info.
(get_dyn_sym_info): Use it.
(elfNN_ia64_relocate_section): Translate local dyn entries
for STT_SECTION symbol to SHF_MERGE section the first time
we see it.
* write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used
in reloc if it has non-zero addend.
* config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check.
* config/tc-sparc.c (md_apply_fix3): Likewise.
2001-11-28 19:15:14 +00:00
Jakub Jelinek
f8df10f4f5
* elf.c (_bfd_elf_rela_local_sym): New.
...
* elflink.h (elf_link_input_bfd): Don't consider empty
merged sections as removed in relocation tests.
* elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
* elf32-i386.c (elf_i386_relocate_section): Handle relocs
against STT_SECTION symbol of SHF_MERGE section.
* elf32-arm.h (elf32_arm_relocate_section): Likewise.
* elf32-avr.c (elf32_avr_relocate_section): Call
_bfd_elf_rela_local_sym.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
* elf32-fr30.c (fr30_final_link_relocate): Likewise.
* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
* elf32-i370.c (i370_elf_relocate_section): Likewise.
* elf32-i860.c (elf32_i860_relocate_section): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf32-v850.c (v850_elf_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elf-hppa.h (elf_hppa_relocate_section): Likewise.
* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
* elf32-sh.c (sh_elf_relocate_section): Likewise for
!partial_inplace relocs. Handle relocs against STT_SECTION
symbol of SHF_MERGE for partial_inplace relocs.
* config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test.
* write.c (adjust_reloc_syms): Don't handle relocs against
SEC_MERGE section symbols specially.
(fixup_segment): Likewise.
2001-11-23 12:17:21 +00:00
H.J. Lu
5ce56ab925
2001-11-15 H.J. Lu <hjl@gnu.org>
...
* config/tc-alpha.c (md_apply_fix3): Fix a typo.
2001-11-16 07:17:12 +00:00
Nick Clifton
94f592af1b
Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function.
2001-11-15 21:29:00 +00:00
Kazu Hirata
b6ff326eba
* config/tc-alpha.c: Fix comment typos.
...
* config/tc-cris.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tahoe.c: Likewise.
* config/tc-v850.c: Likewise.
2001-10-11 23:56:33 +00:00
H.J. Lu
3882b01078
Locale changes from Bruno Haible <haible@clisp.cons.org>.
2001-09-19 05:33:36 +00:00
Richard Henderson
d61a78a7af
* config/tc-alpha.c (alpha_elf_section_letter): New.
...
(alpha_elf_section_flags): New.
* config/tc-alpha.h (md_elf_section_letter): New.
(md_elf_section_flags): New.
* config/tc-ia64.c (ia64_elf_section_letter): New.
* config/tc-ia64.h (md_elf_section_letter): New.
2001-09-11 18:26:04 +00:00
Richard Henderson
ec8fcf4a1d
* config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
...
require_seq and allow_seq. Let !literal omit the sequence number.
(tokenize_arguments): Reject sequence numbers of !allow_seq.
2001-09-08 01:12:00 +00:00
Richard Henderson
19f785835e
* config/tc-alpha.c (struct alpha_insn): Make sequence scalar long.
...
(MACRO_LITERAL, MACRO_BASE, MACRO_BYTOFF, MACRO_JSR): Remove.
(alpha_macros): Remove occurrences of same.
(O_lituse_addr, O_gprel): New.
(DUMMY_RELOC_LITUSE_*): New.
(s_alpha_ucons, s_alpha_arch): Prototype.
(alpha_reloc_op): Construct elements via DEF macro.
(ALPHA_RELOC_SEQUENCE_OK): Remove.
(struct alpha_reloc_tag): Rename from alpha_literal_tag; rename
members to not be literal specific.
(next_sequence_num): New.
(md_apply_fix3): Cope with missing GPDISP_LO16. Adjust for
added/removed BFD relocations.
(alpha_force_relocation, alpha_fix_adjustable): Likewise.
(alpha_adjust_symtab_relocs): Handle GPDISP relocs as well.
(tokenize_arguments): Parse ! relocations properly.
(find_macro_match): Delete unused macro argument types.
(assemble_insn): Add reloc parameter; emit that instead of the
default as appropriate.
(get_alpha_reloc_tag): New. Split from ...
(emit_insn): ... here. Allocate a reloc tag for GPDISP.
(assemble_tokens): Don't search macros if user relocation present.
Copy reloc sequence number to insn struct.
(emit_ldgp): Remove user reloc handling.
(load_expression, emit_lda, emit_ldah, emit_ir_load): Likewise.
(emit_loadstore, emit_ldXu, emit_ldil, emit_stX): Likewise.
(emit_sextX, emit_division, emit_jsrjmp, emit_retjcr): Likewise.
* config/tc-alpha.h (tc_adjust_symtab): Always define.
(struct alpha_fix_tag): Name members less literal specific.
* gas/alpha/alpha.exp: New file.
* gas/alpha/elf-reloc-1.[sd]: New test.
* gas/alpha/elf-reloc-2.[sl]: New test.
* gas/alpha/elf-reloc-3.[sl]: New test.
* gas/alpha/elf-reloc-4.[sd]: New test.
* gas/alpha/fp.exp: Remove file.
* gas/alpha/fp.s: Output to .data not .rdata.
* gas/alpha/fp.d: Adjust to match.
2001-09-05 02:39:43 +00:00
Richard Henderson
ca3f769514
* config/tc-alpha.h (MD_APPLY_FIX3): Define.
...
* config/tc-alpha.c (md_apply_fix3): Rename from md_apply_fix;
use seg parameter instead of now_seg.
2001-08-21 00:22:23 +00:00
Jakub Jelinek
6f112c47dc
* config/tc-alpha.c (tc_gen_reloc): Handle relocs against SEC_MERGE
...
section symbols the same way as externs.
2001-06-24 16:43:31 +00:00
Nick Clifton
f7e42eb4af
Fix copyright notices
2001-03-08 23:24:26 +00:00
Kazu Hirata
664984174e
2001-01-22 Kazu Hirata <kazu@hxi.com>
...
* config/tc-alpha.c: Fix formatting.
2001-01-22 20:24:11 +00:00
Kazu Hirata
1aad8cf8bb
2001-01-19 Kazu Hirata <kazu@hxi.com>
...
* config/tc-alpha.c: Fix formatting.
2001-01-20 04:23:33 +00:00
Kazu Hirata
32ff5c2e6d
2001-01-18 Kazu Hirata <kazu@hxi.com>
...
* config/tc-alpha.c: Fix formatting.
2001-01-19 12:03:34 +00:00
Kazu Hirata
bfb32b5207
2001-01-14 Kazu Hirata <kazu@hxi.com>
...
* config/tc-alpha.c: Fix formatting.
* config/tc-arc.c: Likewise.
* config/tc-arc.h: Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-tahoe.c: Likewise.
* config/tc-vax.c: Likewise.
2001-01-14 18:54:06 +00:00
Phil Blundell
b96ed59a57
2001-01-03 Philip Blundell <pb@futuretv.com>
...
* config/tc-alpha.c (alpha_force_relocation): Handle vtable
relocs.
(alpha_fix_adjustable): Likewise.
(md_apply_fix): Likewise.
2001-01-03 10:03:46 +00:00
Richard Henderson
0a9ef43907
* as.h (rs_align_test): New.
...
* frags.c (NOP_OPCODE): Move default from read.c.
(MAX_MEM_FOR_RS_ALIGN_CODE): New default.
(frag_align_code): New.
* frags.h (frag_align_code): Declare.
* read.c (NOP_OPCODE): Remove.
(do_align): Use frag_align_code.
* write.c (NOP_OPCODE): Remove.
(get_recorded_alignment): New.
(cvt_frag_to_fill): Handle rs_align_test.
(relax_segment): Likewise.
(subsegs_finish): Align last subseg in section to the
section alignment. Use frag_align_code.
* write.h (get_recorded_alignment): Declare.
* config/obj-coff.c (size_section): Handle rs_align_test.
(fill_section, fixup_mdeps): Likewise.
(write_object_file): Use frag_align_code.
* config/tc-alpha.c (alpha_align): Use frag_align_code.
(alpha_handle_align): New.
* config/tc-alpha.h (HANDLE_ALIGN): New.
(MAX_MEM_FOR_RS_ALIGN_CODE): New.
* config/tc-i386.h (md_do_align): Use frag_align_code.
(MAX_MEM_FOR_RS_ALIGN_CODE): New.
* config/tc-ia64.c (ia64_md_do_align): Don't do code alignment.
(ia64_handle_align): New.
* config/tc-ia64.h (HANDLE_ALIGN): New.
(MAX_MEM_FOR_RS_ALIGN_CODE): New.
* config/tc-m32r.c (m32r_do_align): Remove.
(m32r_handle_align): New.
(fill_insn): Use frag_align_code.
* config/tc-m32r.h (md_do_align): Remove.
(HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New.
* config/tc-m88k.c, config/tc-m88k.h: Similarly.
* config/tc-mips.c, config/tc-mips.h: Similarly.
* config/tc-sh.c (sh_cons_align): Use rs_align_test.
(sh_handle_align): Likewise. Handle rs_align_code.
(sh_do_align): Remove.
* config/tc-sh.h (md_do_align): Remove.
(MAX_MEM_FOR_RS_ALIGN_CODE): New.
* config/tc-sparc.c (sparc_cons_align): Use rs_align_test.
(sparc_handle_align): Likewise. Handle rs_align_code.
* config/tc-sparc.h (md_do_align): Remove.
(MAX_MEM_FOR_RS_ALIGN_CODE): New.
2000-12-28 10:07:56 +00:00
Kazu Hirata
bc80588841
2000-12-03 Kazu Hirata <kazu@hxi.com>
...
* tc-a29k.c: Fix formatting.
* tc-alpha.c: Likewise.
* tc-arm.c: Likewise.
* tc-cris.c: Likewise.
* tc-hppa.c: Likewise.
* tc-i370.c: Likewise.
* tc-i386.c: Likewise.
* tc-i860.c: Likewise.
* tc-i960.c: Likewise.
* tc-ia64.c: Likewise.
* tc-m68hc11.c: Likewise.
* tc-m68k.c: Likewise.
* tc-m88k.c: Likewise.
* tc-pj.c: Likewise.
* tc-ppc.c: Likewise.
* tc-sh.c: Likewise.
* tc-sparc.c: Likewise.
* tc-tahoe.c: Likewise.
* tc-vax.c: Likewise.
2000-12-03 06:49:23 +00:00
Richard Henderson
a8316fe296
* dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number.
...
* config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for
tri-state definition of alpha_flag_mdebug.
* config/tc-alpha.c (alpha_flag_mdebug): Init to -1.
(s_alpha_file): Store first .file directive.
(s_alpha_stab): New.
(md_pseudo_table): Add stabs and stabn.
2000-11-17 18:07:33 +00:00
Richard Henderson
4dc7ead9fd
* as.c (debug_type): Init to DEBUG_UNSPECIFIED.
...
* as.h (debug_type): Clarify documentation of the meaning
of this variable.
* dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1.
(print_stats): Fix parenthesis problem.
(now_subseg_size): New.
(dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info.
(dwarf2_directive_file): Don't set debug_type.
(dwarf2_where): Honor DEBUG_DWARF2 first.
(dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno;
do nothing if not emitting dwarf2 debug info, or no work.
* dwarf2dbg.h (dwarf2_emit_insn): Update.
* ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED.
(ecoff_new_file): Likewise.
* read.c (generate_lineno_debug): Kill ecoff hackery. Update
commentary wrt dwarf2.
* config/tc-alpha.c (alpha_adjust_symtab_relocs): Add
ATTRIBUTE_UNUSED as needed.
(emit_insn): Call dwarf2_emit_insn.
(s_alpha_file): New.
(s_alpha_loc): New.
(s_alpha_coff_wrapper): Don't handle them.
(md_pseudo_table): Update for .file and .loc.
* config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
* config/tc-arm.c (output_inst): Update for dwarf2_emit_insn;
don't protect with debug_type.
* config/tc-hppa.c (md_assemble): Likewise.
* config/tc-m68hc11.c (m68hc11_new_insn): Likewise.
* config/tc-mn10300.c (md_assemble): Likewise.
* config/tc-sh.c (md_assemble): Likewise.
* config/tc-v850.c (md_assemble): Likewise.
* config/tc-arm.c (arm_end_of_source): Remove.
* config/tc-hppa.c (pa_end_of_source): Remove.
* config/tc-m68hc11.c (m68hc11_end_of_source): Remove.
* config/tc-mn10300.c (mn10300_finalize): Remove.
* config/tc-sh.c (sh_finalize): Remove.
* config/tc-v850.c (sh_finalize): Remove.
* config/tc-arm.h (md_end): Remove.
* config/tc-hppa.h (md_end): Remove.
(DWARF2_LINE_MIN_INSN_LENGTH): New.
* config/tc-m68hc11.h (md_end): Remove.
* config/tc-mn10300.h (md_end): Remove.
* config/tc-sh.h (md_end): Remove.
* config/tc-v850.h (md_end): Remove.
* config/tc-ia64.c (emit_one_bundle): Don't protect
dwarf2 bits with debug_type.
(md_assemble): Likewise.
(ia64_end_of_source): Don't call dwarf2_finish.
2000-11-17 08:47:52 +00:00
Jakub Jelinek
c810873da1
* elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
...
by STO_ALPHA constants.
* config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits.
2000-11-14 20:46:25 +00:00
Kazu Hirata
1dab94dd91
2000-09-14 Kazu Hirata <kazu@hxi.com>
...
* config/tc-a29k.c: Fix formatting.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arc.h: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-arm.h: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-avr.h: Likewise.
* config/tc-tic30.c: Likewise.
* config/tc-tic30.h: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-tic54x.h: Likewise.
* config/tc-tic80.c: Likewise.
* config/tc-tic80.h: Likewise.
2000-09-15 01:06:52 +00:00