aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2008-06-19updateAlan Modra3-4/+9
2008-06-16 PR gas/6607Hans-Peter Nilsson10-0/+87
* ld-mmix/loc10.d, ld-mmix/loc10.s, ld-mmix/loc10m.d, ld-mmix/loc8.d, ld-mmix/loc8.s, ld-mmix/loc8m.d, ld-mmix/loc9.d, ld-mmix/loc9.s, ld-mmix/loc9m.d: New tests.
2008-06-12 * ldlang.c (print_output_section_statement): If the output sectionNick Clifton3-0/+21
statement has an update_dot_tree expression, apply it to print_dot. (print_input_section): Do not update print_dot if it would move print_dot backwards. (lang_do_assignments_1): If the output section statement has an update_dot_tree expression apply it to dot. * ld-scripts/overlay-size.t (end_of_bss_overlays): Define. (end_of_text_overlays): Define. (end_of_data_overlays): Define. * ld-scripts/overlay-size-map.d: Add expected values for end_of_bss_overlays, end_of_text_overlays and end_of_data_overlays.
2008-06-09 * ld-sh/arch/arch_expected.txt: Regenerate.Kaz Kojima2-25/+29
2008-06-09 * ld-arm/mixed-lib.d: Loosen pattern.Daniel Jacobowitz2-1/+5
2008-06-092008-06-03 Christophe Lyon <christophe.lyon@st.com>Daniel Jacobowitz3-2/+7
bfd/ * elf32-arm.c (arm_stub_is_thumb): Define. (elf32_arm_final_link_relocate): Handle near mode switching stubs. ld/testsuite/ * ld-arm/farcall-thumb-thumb-m.d: Fix branch type. * ld-arm/farcall-thumb-arm.d: Likewise.
2008-05-31 PR ld/6430Nick Clifton3-0/+82
* testsuite/ld-elfcomm/elfcomm.exp (test_sort_common): Test the ascending/descending argument to the --sort-common command line option. * testsuite/ld-elfcomm/sort-common.s: New file. * ld.h (enum sort_order): New. * ldlang.c (lang_check: Fix comment. (lang_common): Sort commons in ascending or descending order. (lang_one_common): Likewise. * lexsup.c (ld_options): Have --sort-common take an option argument. (parse_args): Handle argument to --sort-common. * ld.texinfo (--sort-common): Document new optional argument. * NEWS: Mention new feature.
2008-05-31Ooops, omitted from previous deltaNick Clifton2-0/+8
2008-05-28 ld/testsuite/Nick Clifton2-29/+38
* ld-arm/arm-elf.exp: Skip farcalls tests for non-ARM-EABI targets. * ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: New file. * ld-arm/thumb2-bl-bad-noeabi.d: Likewise. ld/ * ld.texinfo: State that farcalls stubs are supported for ARM-EABI only.
2008-05-23Add more farcall testsNick Clifton10-0/+361
2008-05-23 bfd/Nick Clifton8-64/+94
* elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols. (elf32_arm_stub_add_mapping_symbol): Remove. (elf32_arm_add_stub): Don't generate mapping symbols. Change prototype. (elf32_arm_size_stubs): Use new elf32_arm_add_stub prototype. Don't generate thumb to arm glue for calls. (arm_map_one_stub): Define. (elf32_arm_output_arch_local_syms): Generate mapping symbols for long calls stubs. ld/testsuite/ * ld-arm/farcall-arm-arm.s: Force function type on 'bar'. * ld-arm/farcall-thumb-arm.s: Likewise. * ld-arm/farcall-thumb-arm-blx.d: Fix encoding. * ld-arm/farcall-thumb-arm.d: Likewise. * ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise. * ld-arm/arm-elf.exp (armelftests): Add farcall-mix, farcall-mix2, farcall-group-default, farcall-group-size2, farcall-section Ignore gas warnings in farcall-thumb-arm, farcall-thumb-arm-blx, farcall-thumb-arm-blx-pic-veneer.
2008-05-21 Multi-GOT support for m68k.Nick Clifton20-1/+467279
bfd/ * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key, glist): New fields. (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry, struct elf_m68k_got, struct elf_m68k_bfd2got_entry, struct elf_m68k_multi_got): New data structures. (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p, allow_multigot_p, multi_got_): New fields. (elf_m68k_multi_got): New macro. (elf_m68k_link_hash_newfunc): Initialize new fields of struct elf_m68k_link_hash_entry. (elf_m68k_link_hash_table_create): Initialize new fields of struct elf_m68k_link_hash_table. (elf_m68k_link_hash_table_free): New static function implementing hook. (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New static functions for struct elf_m68k_got. (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash, elf_m68k_got_entry_eq): New static functions for struct elf_m68k_got_entry. (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT, ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros. (enum elf_m68k_get_entry_howto): New enum. (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type, elf_m68k_remove_got_entry_type): New static functions for struct elf_m68k_got_entry. (elf_m68k_add_entry_to_got): New static function. (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq, elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static functions for struct elf_m68k_bfd2got_entry. (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1, elf_m68k_can_merge_gots): New traversal. (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1, elf_m68k_merge_gots): Ditto. (struct elf_m68k_finalize_got_offsets_arg, elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto. (struct elf_m68k_partition_multi_got_arg, elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1, elf_m68k_partition_multi_got): Ditto. (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static functions. (elf_m68k_copy_indirect_symbol): New static function implementing a hook. (elf_m68k_check_relocs): Update to add entries to multi-GOT. (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT. (elf_m68k_always_size_sections): Assign BFDs to GOTs. (elf_m68k_relocate_section): Update to properly handle GOT relocations. (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries of a global symbol. (bfd_elf_m68k_set_target_options): New function. (bfd_elf32_bfd_link_hash_table_free): Define hook. (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link to skip generic calculation of GOT offsets. (elf_backend_copy_indirect_symbol): Define hook. * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function. * bfd-in2.h: Regenerate. ld/ * configure.in (--enable-got): New option. Handle it. * configure: Regenerate. * config.in: Regenerate. * emultempl/m68kelf.em: (got_handling_target_default): New shell variable. (GOT_HANDLING_TARGET_DEFAULT): New macro. (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure option if one was given. (got_handling): New static variable. (elf_m68k_create_output_section_statements): New static function implementing hook. (PARSE_AND_LIST_PROLOGUE): Define shell variable. (OPTION_GOT): New macro. (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify --got option. (got): New linker option. (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string for --got option. (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got option. * ld.texinfo: Document --got=<type> option. * gen-doc.texi: Add M68K. * NEWS: Mention the new feature. ld/testsuite/ * ld-m68k/got-12.s: New file. * ld-m68k/got-13.s: New file. * ld-m68k/got-14.s: New file. * ld-m68k/got-15.s: New file. * ld-m68k/got-34.s: New file. * ld-m68k/got-35.s: New file. * ld-m68k/got-single-12-ok.d: New dump test. * ld-m68k/got-single-13-er.d: New dump test. * ld-m68k/got-negative-14-ok.d: New dump test. * ld-m68k/got-negative-15-er.d: New dump test. * ld-m68k/got-negative-12-13-14-34-ok.d: New dump test. * ld-m68k/got-negative-12-13-14-35-er.d: New dump test. * ld-m68k/got-multigot-14-ok.d: New dump test. * ld-m68k/got-multigot-15-er.d: New dump test. * ld-m68k/got-multigot-12-13-14-34-35-ok.d: New dump test. * ld-m68k/xgot-15.s: New source. * ld-m68k/got-xgot-15-ok.d: New test. * ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: New test. * ld-m68k/m68k.exp: Run new tests.
2008-05-15 bfd/Nick Clifton27-24/+415
* elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define. (THM2_MAX_BWD_BRANCH_OFFSET): Define. (ARM_MAX_FWD_BRANCH_OFFSET): Define. (ARM_MAX_BWD_BRANCH_OFFSET): Define. (THM_MAX_FWD_BRANCH_OFFSET): Define. (THM_MAX_BWD_BRANCH_OFFSET): Define. (arm_long_branch_stub): Define. (arm_pic_long_branch_stub): Define. (arm_thumb_v4t_long_branch_stub): Define. (arm_thumb_thumb_long_branch_stub): Define. (arm_thumb_arm_v4t_long_branch_stub): Define. (STUB_SUFFIX): Define. (elf32_arm_stub_type): Define. (elf32_arm_stub_hash_entry): Define. (elf32_arm_link_hash_entry): Add stub_cache field. (arm_stub_hash_lookup): Define. (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd, add_stub_section, layout_sections_again, stub_group, bfd_count, top_index, input_list fields. (elf32_arm_link_hash_newfunc): Init new field. (stub_hash_newfunc): New function. (elf32_arm_link_hash_table_create): Init stub_hash_table. (elf32_arm_hash_table_free): New function. (arm_type_of_stub): New function. (elf32_arm_stub_name): New function. (elf32_arm_get_stub_entry): New function. (elf32_arm_stub_add_mapping_symbol): New function. (elf32_arm_add_stub): New function. (arm_build_one_stub): New function. (arm_size_one_stub): New function. (elf32_arm_setup_section_lists): New function. (elf32_arm_next_input_section): New function. (group_sections): New function. (elf32_arm_size_stubs): New function. (elf32_arm_build_stubs): New function. (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections. (bfd_elf32_arm_process_before_allocation): No longer handle R_ARM_CALL and R_ARM_THM_CALL. (using_thumb_only): New function. (elf32_arm_final_link_relocate): Redirect calls to stub if range exceeds encoding capabilities. (bfd_elf32_bfd_link_hash_table_free): Define. * bfd-in.h (R_ARM_max): Fix value to 130. (elf32_arm_setup_section_lists): Protype. (elf32_arm_next_input_section): Protype. (elf32_arm_size_stubs): Protype. (elf32_arm_build_stubs): Protype. ld/ * emultempl/armelf.em (build_section_lists): New function. (stub_file): Define. (need_laying_out): Define. (group_size): Define. (hook_stub_info): Define. (hook_in_stub): New function. (elf32_arm_add_stub_section): New function. (gldarm_layout_sections_again): New function. (gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate stubs for long calls if needed. (arm_elf_create_output_section_statements): create stub_file bfd. (arm_for_each_input_file_wrapper): New function. (arm_lang_for_each_input_file): New function. (lang_for_each_input_file): Define. (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE. (PARSE_AND_LIST_LONGOPTS): Add option stub-group-size. (PARSE_AND_LIST_OPTIONS): Add option stub-group-size. (PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case. (LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish. * ld/lang.c (print_input_statement): Skip if bfd has BFD_LINKER_CREATED. ld/testsuite * ld-arm/arm-elf.exp (armelftests): Add farcall-arm-arm, farcall-arm-arm-pic-veneer, farcall-arm-arm-be8 farcall-arm-thumb, farcall-arm-thumb-blx, farcall-arm-thumb-pic-veneer, farcall-arm-thumb-blx-pic-veneer, farcall-thumb-thumb, farcall-thumb-thumb-pic-veneer, farcall-thumb-thumb-blx, farcall-thumb-thumb-m, farcall-thumb-thumb-m-pic-veneer, farcall-thumb-thumb-blx-pic-veneer, farcall-thumb-arm, farcall-thumb-arm-pic-veneer, farcall-thumb-arm-blx, farcall-thumb-arm-blx-pic-veneer. Change thumb2-bl-as-thumb1-bad, thumb2-bl-bad. * ld-arm/thumb2-bl-as-thumb1-bad.d: Reflects farcall stub generation. * ld-arm/thumb2-bl-bad.d: Likewise. * ld-arm/thumb2-bl-as-thumb1-bad.s: Update comments. * ld-arm/thumb2-bl-bad.s: Likewise.
2008-05-07bfd/Alan Modra3-12/+20
* elf32-spu.c (spu_elf_special_sections): Add "._ea". (spu_elf_relocate_section): Handle relocations against symbols defined in ._ea specially. binutils/ * embedspu.sh: Take note of R_SPU_PPU32/64 relocs without a symbol, and if present, put image in ".data.speelf". Put program handle in ".data.spehandle". ld/emulparams/ * elf32_spu.sh (OTHER_SECTIONS): Add "._ea". * elf32ppc.sh: If building with spu support, put ".data.spehandle" sections at the start of ".data" and provide a symbol to locate the directory of embedded spe programs. ld/testsuite/ * ld-spu/ear.s: Align various sections. * ld-spu/embed.rd: Update.
2008-05-07missed from last commitAlan Modra1-0/+2
2008-05-05 PR 6473Alan Modra3-0/+16
* ld-elf/lma.s, ld-elf/lma.lnk: New test. * ld-elf/binutils.exp: Run it.
2008-05-032008-05-03 Mike Frysinger <vapier@gentoo.org>Mike Frysinger2-1/+5
* ld-scripts/defined.s: Use .set syntax rather than =.
2008-05-022008-05-02 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-3/+9
PR ld/6475 * ld-scripts/rgn-over8-ok.d: Accept any alignment.
2008-04-29 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)Daniel Jacobowitz4-0/+29
(_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations even if they are not loaded. * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section first. * ld-arm/symbian-seg1.s, ld-arm/symbian-seg1.d: New files. * ld-arm/arm-elf.exp: Run symbian-seg1.
2008-04-28 * ld-scripts/rgn-over8.s: Tweak.Nathan Sidwell2-1/+3
2008-04-28ld/Nathan Sidwell5-9/+50
* ldlang.c (lang_size_sections_1): Don't check LMA overflow on non-load sections. ld/testsuite/ * ld-scripts/rgn-over.exp: Allow -ok file names to pass. * ld-scripts/rgn-over8.s: New. * ld-scripts/rgn-over8.t: New. * ld-scripts/rgn-over8-ok.d: New.
2008-04-21bfd/Nathan Sidwell3-0/+16
* elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't set the value of undefined symbols in shared objects. (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for undefined symbols unless pointer equality is needed. ld/testsuite/ * ld-vxworks/plt-mips1.s: New. * ld-vxworks/plt-mips1.d: New.
2008-04-16bfd/David S. Miller12-0/+320
* reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22, BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22, BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New. * libbfd.h: Regnerate. * bfd-in2.h: Regenerate. * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for GOTDATA relocations. (sparc_reloc_map): Likewise. (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like R_SPARC_GOT*. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22, R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc. Simply ignore R_SPARC_GOTDATA_OP relocations. gas/ * config/tc-sparc.c (sparc_ip): Add support for gotdata mnemonics and relocation generation. (tc_gen_reloc): Likewise. gas/testsuite/ * gas/sparc/gotops32.d: New. * gas/sparc/gotops32.s: Likewise. * gas/sparc/gotops64.d: Likewise. * gas/sparc/gotops64.s: Likewise. * gas/sparc/sparc.exp: Run new gotdata tests. ld/testsuite/ * ld-sparc/gotop32.dd: New. * ld-sparc/gotop32.rd: Likewise. * ld-sparc/gotop32.s: Likewise. * ld-sparc/gotop32.sd: Likewise. * ld-sparc/gotop32.td: Likewise. * ld-sparc/gotop64.dd: Likewise. * ld-sparc/gotop64.rd: Likewise. * ld-sparc/gotop64.s: Likewise. * ld-sparc/gotop64.sd: Likewise. * ld-sparc/gotop64.td: Likewise. * ld-sparc/sparc.exp: Run new gotdata tests.
2008-04-152008-04-15 Andrew Stubbs <andrew.stubbs@st.com>Andrew Stubbs21-40/+103
gas/ * config/tc-sh.c (md_apply_fix): Make sure BFD_RELOC_SH_PCRELIMM8BY4 relocations are properly aligned, and not negative. gas/testsuite/ * gas/sh/arch/arch.exp: Align PC-relative instructions in the gererated assembly files. * gas/sh/arch/sh-dsp.s: Regenerate. * gas/sh/arch/sh.s: Regenerate. * gas/sh/arch/sh2.s: Regenerate. * gas/sh/arch/sh2a-nofpu-or-sh3-nommu.s: Regenerate. * gas/sh/arch/sh2a-nofpu-or-sh4-nommu-nofpu.s: Regenerate. * gas/sh/arch/sh2a-nofpu.s: Regenerate. * gas/sh/arch/sh2a-or-sh3e.s: Regenerate.: Regenerate. * gas/sh/arch/sh2a-or-sh4.s: Regenerate. * gas/sh/arch/sh2a.s: Regenerate. * gas/sh/arch/sh2e.s: Regenerate. * gas/sh/arch/sh3-dsp.s: Regenerate. * gas/sh/arch/sh3-nommu.s: Regenerate. * gas/sh/arch/sh3.s: Regenerate. * gas/sh/arch/sh3e.s: Regenerate. * gas/sh/arch/sh4-nofpu.s: Regenerate. * gas/sh/arch/sh4-nommu-nofpu.s: Regenerate. * gas/sh/arch/sh4.s: Regenerate. * gas/sh/arch/sh4a-nofpu.s: Regenerate. * gas/sh/arch/sh4a.s: Regenerate. * gas/sh/arch/sh4al-dsp.s: Regenerate. * gas/sh/err-mova.s: New test. ld/testsuite/ * ld-sh/arch/sh-dsp.s: Regenerate. * ld-sh/arch/sh.s: Regenerate. * ld-sh/arch/sh2.s: Regenerate. * ld-sh/arch/sh2a-nofpu-or-sh3-nommu.s: Regenerate. * ld-sh/arch/sh2a-nofpu-or-sh4-nommu-nofpu.s: Regenerate. * ld-sh/arch/sh2a-nofpu.s: Regenerate. * ld-sh/arch/sh2a-or-sh3e.s: Regenerate.: Regenerate. * ld-sh/arch/sh2a-or-sh4.s: Regenerate. * ld-sh/arch/sh2a.s: Regenerate. * ld-sh/arch/sh2e.s: Regenerate. * ld-sh/arch/sh3-dsp.s: Regenerate. * ld-sh/arch/sh3-nommu.s: Regenerate. * ld-sh/arch/sh3.s: Regenerate. * ld-sh/arch/sh3e.s: Regenerate. * ld-sh/arch/sh4-nofpu.s: Regenerate. * ld-sh/arch/sh4-nommu-nofpu.s: Regenerate. * ld-sh/arch/sh4.s: Regenerate. * ld-sh/arch/sh4a-nofpu.s: Regenerate. * ld-sh/arch/sh4a.s: Regenerate. * ld-sh/arch/sh4al-dsp.s: Regenerate.
2008-04-07 * ld-spu/ovl2.s: Extend to test jump table references andAlan Modra3-29/+95
absolute _SPUEAR_ syms. * ld-spu/ovl2.d: Update.
2008-03-28 * ld-elfcomm/elfcomm.exp: Run $READELF not readelf.Joseph Myers2-3/+7
2008-03-26 * ld-elf/flags1.d: Adjust for MIPS text alignment.Daniel Jacobowitz2-1/+5
2008-03-25 bfd/Nathan Sidwell3-0/+46
* elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs in vxworks tls_vars sections. (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise. * elf32-i386.c (allocate_dynrelocs, elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise. * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections, ppc_elf_relocate_section): Likewise. * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections, sh_elf_relocate_section): Likewise. * elfxx-sparc.c (allocate_dynrelocs, _bfd_sparc_elf_size_dynamic_sections, _bfd_sparc_elf_relocate_section): Likewise. ld/testsuite/ * ld-vxworks/tls-3.s: New. * ld-vxworks/tls-3.d: New.
2008-03-22 * ld-cris/libdso-10.d: Adjust for change in objdump output.Hans-Peter Nilsson2-5/+9
2008-03-21 * ld-mips-elf/dyn-sec64.d, ld-mips-elf/dyn-sec64.s,Adam Nemet5-0/+79
ld-mips-elf/dyn-sec64.ld: New test. * ld-mips-elf/mips-elf.exp: Run it.
2008-03-20binutils/Richard Sandiford8-0/+142
* readelf.c (print_mips_got_entry): New function. (process_mips_specific): Print GOT information. ld/testsuite/ * ld-mips-elf/got-dump-1.d, ld-mips-elf/got-dump-1.s, ld-mips-elf/got-dump-1.ld, ld-mips-elf/got-dump-2.d, ld-mips-elf/got-dump-2.s, ld-mips-elf/got-dump-2.ld: New tests. * ld-mips-elf/mips-elf.exp: Run them.
2008-03-20bfd/Richard Sandiford5-4/+16
* elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro. (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000. ld/testsuite/ * ld-mips-elf/elf-rel-got-n64-linux.d: Expect bit 63 rather than bit 31 of the second GOT entry to be set. * ld-mips-elf/elf-rel-got-n64.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise. * ld-mips-elf/elf-rel-xgot-n64.d: Likewise.
2008-03-17ld/testsuite/Richard Sandiford5-352/+78
* ld-mips-elf/eh-frame1-n32.d: Expect a warning about .eh_frame_hdr. Remove duplicate CIEs. Adjust relocation addresses and .eh_frame offsets accordingly. Do not allow there to be any trailing R_MIPS_NONE relocations. * ld-mips-elf/eh-frame1-n64.d: Likewise. * ld-mips-elf/eh-frame2-n32.d: Likewise. * ld-mips-elf/eh-frame2-n64.d: Likewise.
2008-03-17gas/testsuite/Richard Sandiford2-14/+26
* gas/mips/elf-rel26.d: Add -32. * gas/mips/mips16-intermix.d: Likewise. ld/testsuite/ * ld-mips-elf/mips-elf.exp (o32_as_flags, o32_ld_flags): New variables. (mips16_call_global_test, mips16_intermix_test): Use them.
2008-03-16bfd/H.J. Lu27-0/+281
2008-03-16 H.J. Lu <hongjiu.lu@intel.com> PR ld/5789 PR ld/5943 * elf32-i386.c (elf_i386_relocate_section): Issue an error for R_386_GOTOFF relocaton against undefined hidden/internal symbols when building a shared object. * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32 relocaton against undefined hidden/internal symbols when building a shared object. (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol is referenced locally, but isn't defined in a regular file. ld/testsuite/ 2008-03-16 H.J. Lu <hongjiu.lu@intel.com> PR ld/5789 PR ld/5943 * ld-i386/hidden1.d: New. * ld-i386/hidden1.s: Likewise. * ld-i386/hidden2.d: Likewise. * ld-i386/hidden2.s: Likewise. * ld-i386/hidden3.d: Likewise. * ld-i386/hidden4.s: Likewise. * ld-i386/protected1.d: Likewise. * ld-i386/protected1.s: Likewise. * ld-i386/protected2.d: Likewise. * ld-i386/protected2.s: Likewise. * ld-i386/protected3.d: Likewise. * ld-i386/protected3.s: Likewise. * ld-x86-64/hidden1.d: Likewise. * ld-x86-64/hidden1.s: Likewise. * ld-x86-64/hidden2.d: Likewise. * ld-x86-64/hidden2.s: Likewise. * ld-x86-64/hidden3.d: Likewise. * ld-x86-64/hidden3.s: Likewise. * ld-x86-64/protected1.d: Likewise. * ld-x86-64/protected1.s: Likewise. * ld-x86-64/protected2.d: Likewise. * ld-x86-64/protected2.s: Likewise. * ld-x86-64/protected3.d: Likewise. * ld-x86-64/protected3.s: Likewise. * ld-i386/i386.exp: Run hidden1, hidden2, hidden3, protected1, protected2 and protected3. * ld-x86-64/x86-64.exp: Likewise.
2008-03-14 * ld-spu/ovl2.s: Make setjmp global.Alan Modra3-3/+9
* ld-spu/ovl2.d: Update.
2008-03-12include/elf/Alan Modra2-6/+11
PR 5900 * common.h (SHN_BAD): Delete. (SHN_LORESERVE .. SHN_HIRESERVE): Move to.. * external.h: ..here. * internal.h (SHN_LORESERVE, SHN_HIRESERVE): Define. (SHN_LOPROC, SHN_HIPROC, SHN_LOOS, SHN_HIOS): Define. (SHN_ABS, SHN_COMMON, SHN_XINDEX, SHN_BAD): Define. bfd/ PR 5900 * elf-bfd.h: Include elf/internal.h after elf/external.h. * elfcode.h (elf_swap_symbol_in): Map reserved shndx range. (elf_swap_symbol_out): Adjust SHN_XINDEX test. (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values seen in external structs. (valid_section_index_p): Delete. (elf_object_p): Don't increment section numbers over reserved range. Simplify test for valid sh_link, sh_info and e_shstrndx fields. (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values seen in external structs. Don't increment section numbers over reserved range. * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx. (bfd_section_from_shdr): Likewise. (group_signature): Range check before accessing elf_elfsections. (_bfd_elf_setup_sections): Likewise. (bfd_section_from_shdr): Likewise. (bfd_section_from_shdr): Don't increment section number over reserved sections. (assign_file_positions_for_non_load_sections): Likewise. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_write_object_contents): Likewise. (assign_section_numbers): Likewise. Adjust for changed SHN_*. (prep_headers): Delete unused variable. * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust for changed SHN_* values. (check_dynsym, elf_link_input_bfd): Likewise. (bfd_elf_final_link): Likewise. Don't skip over reserved section range. (elf_fixup_link_order): Check that sh_link field is valid. * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before accesssing elf_elfsections. * elf32-avr.c (elf32_avr_size_stubs): Likewise. * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise. * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed SHN_* defines. Test for SHN_BAD return from _bfd_elf_section_from_bfd_section binutils/ PR 5900 * readelf.c (SECTION_HEADER_INDEX, SECTION_HEADER_NUM): Delete. Remove use throughout file. (SECTION_HEADER): Likewise. (dump_relocations): Don't adjust st_shndx for reserved range. (process_file_header): Mask SHN_XINDEX to values seen in external elf structs. Simplify valid section index tests. (get_32bit_elf_symbols, get_64bit_elf_symbols): Mask SHN_XINDEX. Map reserved st_shndx to internal form. (process_section_groups): Test that group symbol st_shndx is in range, not just non-zero. Delete reserved range check. (get_symbol_index_type): Mask "type" to 16 bits when printing PRC, OS or RSV. gdb/ PR 5900 * elfread.c (elf_symtab_read): Make shndx an unsigned int. * mipsread.c: Include elf/internal.h. (read_alphacoff_dynamic_symtab): Map external reserved sym_shndx to internal range. ld/testsuite/ PR 5900 * ld-elf/sec64k.exp: Update.
2008-03-082008-03-08 Paul Brook <paul@codesourcery.com>Paul Brook4-0/+48
bfd/ * elf32-arm.c (insert_thumb_branch): Rewrite. (elf32_thumb_to_arm_stub): Use new insert_thumb_branch. ld/testsuite/ * ld-arm/arm-elf.exp (armeabitests): Add thumb2-b-interwork. * ld-arm/thumb2-b-interwork.d: New test. * ld-arm/thumb2-b-interwork.s: New test.
2008-03-082008-03-07 Paul Brook <paul@codesourcery.com>Paul Brook6-1/+59
bfd/ * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and MOVT relocations. (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign extension. (elf32_arm_relocate_section): Handle MOVW and MOVT relocations. Improve safety check for other weird relocations. (elf32_arm_check_relocs): Only set h->needs_plt for branch/call relocations. gas/ * config/tc-arm.c (md_apply_fix): Use correct offset range. ld/testsuite/ * ld-arm/arm-elf.exp (armelftests): Add movw-merge and arm-app-movw. * ld-arm/arm-app-movw.s: New test. * ld-arm/arm-app.r: Update expected output. * ld-arm/movw-merge.d: New test. * ld-arm/movw-merge.s: New test.
2008-03-01bfd/Alan Modra2-3/+19
* elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs if emitrelocations. (get_relocs): New function, split out from.. (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if emitrelocations. Remove indx temp. (ppc_size_one_stub): Count new stub relocs. (ppc64_elf_size_stubs): Count new glink reloc. (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations. (ppc64_elf_finish_dynamic_sections): Output glink relocs. * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic glink code. ld/testsuite/ * ld-powerpc/relbrlt.d: Update. Also check .branch_lt section.
2008-02-27 * ld-cris/libdso-10.d: Update expected output for the DynamicCatherine Moore2-5/+10
Section to allow an arbitrary number of spaces.
2008-02-22 ld/testsuite/Mark Mitchell2-1/+10
* ld-elf/seg.d: Expect .reginfo section on MIPS.
2008-02-20 * ld-auto-import/auto-import.exp: Use $ld to link the dll forNick Clifton2-2/+7
cygwin, not $CC.
2008-02-202008-02-20 Paul Brook <paul@codesourcery.com>Paul Brook4-0/+31
ld/ * emultempl/armelf.em (OPTION_FIX_V4BX_INTERWORKING): Define. (PARSE_AND_LIST_LONGOPTS): Add fix-v4bx-interworking. (PARSE_AND_LIST_OPTIONS): Ditto. (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_FIX_V4BX_INTERWORKING. * emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Add .v4_bx. * emulparams/armelf_linux.sh (OTHER_TEXT_SECTIONS): Ditto. * emulparams/armnto.sh (OTHER_TEXT_SECTIONS): Ditto. * ld.texinfo: Document --fix-v4bx-interworking. ld/testsuite/ * ld-arm/armv4-bx.d: New test. * ld-arm/armv4-bx.s: New test. * ld-arm/arm.ld: Add .v4bx. * ld-arm/arm-elf.exp: Add armv4-bx. gas/testsuite/ * gas/arm/thumb.d: Exclude EABI targets. * gas/arm/arch4t.d: Exclude EABI targts. * gas/arm/v4bx.d: New test. * gas/arm/v4bx.s: New test. * gas/arm/thumb-eabi.d: New test. * gas/arm/arch4t-eabi.d: New test. gas/ * config/tc-arm.c (fix_v4bx): New variable. (do_bx): Generate V4BX relocations. (md_assemble): Allow bx on v4 codes when fix_v4bx. (md_apply_fix): Handle BFD_RELOC_ARM_V4BX. (tc_gen_reloc): Ditto. (OPTION_FIX_V4BX): Define. (md_longopts): Add fix-v4bx. (md_parse_option): Handle OPTION_FIX_V4BX. (md_show_usage): Document --fix-v4bx. * doc/c-arm.texi: Document --fix-v4bx. bfd/ * reloc.c: Add BFD_RELOC_ARM_V4BX. * elf32-arm.c (elf32_arm_reloc_map): Add BFD_RELOC_ARM_V4BX. (ARM_BX_GLUE_SECTION_NAME, ARM_BX_GLUE_SECTION_NAME): Define. (elf32_arm_link_hash_table): Add bx_glue_size and bx_glue_offset. Update comment for fix_v4bx. (elf32_arm_link_hash_table_create): Zero bx_glue_size and bx_glue_offset. (ARM_BX_VENEER_SIZE, armbx1_tst_insn, armbx2_moveq_insn, armbx3_bx_insn): New. (bfd_elf32_arm_allocate_interworking_sections): Allocate BX veneer section. (bfd_elf32_arm_add_glue_sections_to_bfd): Ditto. (bfd_elf32_arm_process_before_allocation): Record BX veneers. (record_arm_bx_glue, elf32_arm_bx_glue): New functions. (elf32_arm_final_link_relocate): Handle BX veneers. (elf32_arm_output_arch_local_syms): Output mapping symbol for .v4_bx. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate.
2008-02-18 * lib/ld-lib.exp (run_dump_test): Don't apply prune_warningsHans-Peter Nilsson2-2/+7
for tool invocations where warnings or errors can be matched.
2008-02-142008-02-14 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu3-6/+13
* ld-shared/sh1.c (shlib_overriddencall2): Moved to ... * ld-shared/sh2.c (shlib_overriddencall2): Here. New.
2008-02-07 * ld-spu/ovl.d: Update.Alan Modra3-16/+23
* ld-spu/ovl2.d: Update.
2008-02-04binutils/testsuite/Bob Wilson2-0/+13
* binutils-all/objdump.exp (cpus_expected): Add xtensa. ld/testsuite/ * ld-undefined/undefined.exp: XFAIL for xtensa*-*-linux*.
2008-02-012008-01-31 Marc Gauthier <marc@tensilica.com>Bob Wilson4-3/+9
bfd/ * config.bfd (xtensa*-*-*): Recognize processor variants. gas/ * configure.tgt (xtensa*-*-*): Recognize processor variants. gas/testsuite/ * gas/all/gas.exp: Recognize Xtensa processor variants. * gas/elf/elf.exp: Likewise. * gas/lns/lns.exp: Likewise. ld/ * configure.tgt (xtensa*-*-*): Recognize processor variants. ld/testsuite/ * ld-elf/merge.d: Recognize Xtensa processor variants. * ld-xtensa/coalesce.exp: Likewise. * ld-xtensa/lcall.exp: Likewise.
2008-01-28* ld-elfvers/vers.exp (test_ar): Sort the expected output so thatNick Clifton2-1/+6
it has matches the ordering of the obtained output.