summaryrefslogtreecommitdiffstats
path: root/bfd/elf32-arm.c
Commit message (Collapse)AuthorAgeFilesLines
* * elf32-arm.c: Move sysdep.h to start of file.Andrew Jenner2009-05-131-1/+1
|
* 2009-05-05 Paul Brook <paul@codesourcery.com>Paul Brook2009-05-051-0/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype. * bfd-in2.h: Regenerate. * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define. (_arm_elf_section_data): Add text and exidx fields. (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size, insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31, copy_exidx_entry): New functions. (elf32_arm_write_section): Fixup .ARM.exidx contents. ld/ * emultempl/armelf.em (compare_output_sec_vma): New function. (gld${EMULATION_NAME}_finish): Add exidx munging code. ld/testsuite/ * ld-arm/arm.ld: Add .ARM.exidx and .ARM.extab. * ld-arm/arm-elf.exp: Add unwind-[1-4]. * ld-arm/unwind-1.d: New test. * ld-arm/unwind-1.s: New test. * ld-arm/unwind-2.d: New test. * ld-arm/unwind-2.s: New test. * ld-arm/unwind-3.d: New test. * ld-arm/unwind-3.s: New test. * ld-arm/unwind-4.d: New test. * ld-arm/unwind-4.s: New test.
* 2009-05-05 Christophe lyon <christophe.lyon@st.com>Christophe Lyon2009-05-051-68/+36
| | | | | | | | | | bfd/ * elf32-arm.c (DEF_STUBS): New helper define. (DEF_STUB): Likewise. (stub_def): New type. (stub_definitions): New array, containing stub template pointers and sizes. (arm_size_one_stub): Make use of stub_definitions.
* bfd:Joseph Myers2009-04-301-4/+15
| | | | | | | | | | | | * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute MOVW and MOVT relocations in a shared library link. ld/testsuite: * ld-arm/movw-shared-1.d, ld-arm/movw-shared-1.s, ld-arm/movw-shared-2.d, ld-arm/movw-shared-2.s, ld-arm/movw-shared-3.d, ld-arm/movw-shared-3.s, ld-arm/movw-shared-4.d, ld-arm/movw-shared-4.s: New tests. * ld-arm/arm-elf.exp: Run these new tests.
* 2009-04-22 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-221-128/+61
| | | | | | | | | | | | | | | | | | PR9743 bfd/ * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations. (elf32_arm_size_stubs): Likewise. (record_thumb_to_arm_glue): Deleted unused function. (bfd_elf32_arm_process_before_allocation): No longer handle R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here. (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations. testsuite/ * ld-arm/arm-call.d: Update expected result. * ld-arm/arm-pic-veneer.d: Likewise. * ld-arm/thumb2-b-interwork.d: Likewise.
* bfd/Daniel Jacobowitz2009-04-211-11/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED. (elf32_arm_write_section): Declare early. (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD. (arm_allocate_glue_section_space): Exclude empty sections. (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED. (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub BFD. (elf32_arm_output_glue_section, elf32_arm_final_link): New. (elf32_arm_merge_eabi_attributes): Skip the stub BFD. (elf32_arm_size_dynamic_sections): Allocate interworking sections here. (bfd_elf32_bfd_final_link): Define. ld/ * emultempl/armelf.em (bfd_for_interwork, arm_elf_after_open) (arm_elf_set_bfd_for_interworking): Delete. (arm_elf_before_allocation): Do not set the interworking BFD. Move allocation inside not-dynamic block. (arm_elf_create_output_section_statements): Create glue sections and set the interworking BFD here. (LDEMUL_AFTER_OPEN): Delete. ld/testsuite/ * ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d, ld-arm/farcall-group-size2.d, ld-arm/farcall-group.d, ld-arm/farcall-mixed-lib.d: Update for linker changes.
* 2009-04-17 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-171-6/+23
| | | | | | | | | | | | | bfd/ * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through PLT entries to an undefined symbol when generating a shared library. testsuite/ * ld-arm/arm-elf.exp: Add new test farcall-mixed-lib. * ld-arm/farcall-mixed-lib.d: Update expected output. * ld-arm/farcall-mixed-lib1.s: New file. * ld-arm/farcall-mixed-lib2.s: New file.
* 2009-04-15 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-151-2/+3
| | | | | | | | | | | | | bfd/ * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM branch to an undef weak symbol into a jump to next instruction if a PLT entry will be created. testsuite/ * ld-arm/arm-elf.exp: Add 1 more test to check undef weak reference with PLT in ARM mode. * ld-arm/thumb2-bl-undefweak1.d, ld-arm/thumb2-bl-undefweak1.s: New files.
* 2009-04-02 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-021-8/+38
| | | | | | | | | | | | | | | bfd/ * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb, elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long branch stubs. (elf32_arm_stub_type): New enum values for the two new stubs. (arm_type_of_stub): Make use of the two new stubs. (arm_size_one_stub): Handle the two new stubs. testsuite/ * ld-arm/farcall-thumb-thumb-pic-veneer.d: Update expected results. * ld-arm/farcall-thumb-thumb.d: Likewise.
* 2009-04-01 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-04-011-33/+26
| | | | | | bfd/ * elf32-arm.c (group_sections): Rewrite loops for better readability.
* * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", notMark Mitchell2009-03-281-20/+20
| | | | | | | | | "ERROR:", in error messages. * cpu-arm.c (bfd_arm_merge_machines): Likewise. * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise. * elf32-arm.c (tag_cpu_arch_combine): Likewise. (elf32_arm_merge_eabi_attributes): Likewise. (elf32_arm_merge_private_bfd_data): Likewise.
* * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.Daniel Jacobowitz2009-03-171-2/+2
|
* PR 9934Nick Clifton2009-03-131-4/+10
| | | | | | | | * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section. * elflink.c (elf_link_read_relocs_from_section): Use NUM_SHDR_ENTRIES. Gracefully handle the case where there are relocs but no symbol table. * elf32-arm.c (elf32_arm_check_relocs): Likewise.
* 09-03-05 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-03-061-8/+24
| | | | | | | | | | | | bfd/ * elf32-arm.c (group_sections): Take next section size into account before accepting to group it. testsuite/ * ld-arm/arm-elf.exp: Add new farcall-group-limit test. * ld-arm/farcall-group-limit.d: New file. * ld-arm/farcall-group3.s: New file. * ld-arm/farcall-group4.s: New file.
* 2009-03-05 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-03-051-11/+42
| | | | | | | | | | | | | | | | | | bfd/ * elf32-arm.c (arm_type_of_stub): Handle long branches targetting PLT entries. (elf32_arm_final_link_relocate): Likewise. testsuite/ * ld-arm/arm-elf.exp: Add 2 more tests to check long branch stubs in PLT context. * ld-arm/farcall-mixed-app-v5.d: New file. * ld-arm/farcall-mixed-app.d: Likewise. * ld-arm/farcall-mixed-app.r: Likewise. * ld-arm/farcall-mixed-app.s: Likewise. * ld-arm/farcall-mixed-app.sym: Likewise. * ld-arm/farcall-mixed-lib.d: Likewise. * ld-arm/farcall-mixed-lib.r: Likewise.
* 2009-02-26 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-02-261-27/+73
| | | | | | | | | | | | | | | | | | | | | | bfd/ * elf32-arm.c (stub_reloc_type): Removed. (insn_sequence): Renamed reloc_type field to r_type. (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub. (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise. (elf32_arm_stub_long_branch_thumb_only_pic): Likewise. (elf32_arm_stub_type): Add new enum entries for the new stubs. (arm_stub_is_thumb): Catch new stubs. (arm_type_of_stub): Handle new stubs. (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs. (bfd_elf32_arm_process_before_allocation): Remove useless condition. testsuite/ * ld-arm/arm-elf.exp: Add 3 tests for the 3 new stubs. * ld-arm/farcall-thumb-arm-pic-veneer.d: New expected result, the test is now expected to pass. * ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Likewise. * ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
* bfd/Daniel Jacobowitz2009-02-241-10/+27
| | | | | | | | | | | | | | | * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename to elf32_arm_stub_long_branch_any_arm_pic. (elf32_arm_stub_long_branch_any_thumb_pic): New. (enum elf32_arm_stub_type, arm_type_of_stub) (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC separately. ld/testsuite/ * ld-arm/farcall-arm-thumb-blx-pic-veneer.d, ld-arm/farcall-arm-thumb-pic-veneer.d, ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Update for fixed Thumb PIC stub.
* 2009-02-24 Joseph Myers <joseph@codesourcery.com>Daniel Jacobowitz2009-02-241-28/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf32-arm.c (PREV_SEC): Update comment. (group_sections): Rename argument to stubs_always_after_branch. Reverse the list and place stubs at the end of input sections. Undefine NEXT_SEC. (elf32_arm_size_stubs): Update to use stubs_always_after_branch. ld/ * ld.texinfo (ARM): Document changed meaning of --stub-group-size. * emultempl/armelf.em (hook_in_stub): Insert after the input section. (elf32_arm_add_stub_section): Update comment. (PARSE_AND_LIST_OPTIONS): Update help for --stub-group-size. 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com> ld/testsuite/ * ld-arm/arm-elf.exp (armeabitests): Update duplicate test names. Use normal output files for big-endian. * ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: Delete. * ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d, ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d, ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d, ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d, ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d, ld-arm/farcall-thumb-arm-be8.d, ld-arm/farcall-thumb-arm-blx-pic-veneer.d, ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm-short.d, ld-arm/farcall-thumb-arm.d, ld-arm/farcall-thumb-thumb-blx-pic-veneer.d, ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d, ld-arm/farcall-thumb-thumb.d, ld-arm/thumb2-bl-as-thumb1-bad.d, ld-arm/thumb2-bl-bad.d: Update for moved stubs.
* * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.Daniel Jacobowitz2009-02-241-7/+9
| | | | | | Fix formatting. (arm_size_one_stub): Remove unnecessary break. (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
* 2009-02-23 Christophe Lyon <christophe.lyon@st.com>Daniel Jacobowitz2009-02-231-168/+208
| | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf32-arm.c (stub_insn_type): New type. (stub_reloc_type): Likewise. (insn_sequence): Likewise. (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence. (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise. (elf32_arm_stub_long_branch_thumb_only): Likewise. (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise. (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise. (elf32_arm_stub_long_branch_any_any_pic): Likewise. (elf32_arm_stub_hash_entry): Add new helper fields. (stub_hash_newfunc): Initialize these new fields. (arm_build_one_stub): Encode Arm and Thumb instructions separately to take endianness into account. (arm_size_one_stub): Compute size of stubs using insn_sequence. (arm_map_one_stub): Code is now more generic, thanks to insn_sequence. ld/testsuite/ * ld-arm/arm-elf.exp: Add new farcall-thumb-arm-be8 test. * ld-arm/farcall-thumb-arm-be8.d: New expected result. * ld-arm/farcall-arm-arm-be8.d: Replace wildcards by instructions.
* 2009-02-23 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-02-231-28/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub code. (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise. (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when BLX is not available. Fix typo in warning message. Add comments and improve formatting. (arm_build_one_stub): Adjust to new elf32_arm_stub_long_branch_v4t_thumb_arm stub. (arm_map_one_stub): Likewise. testsuite/ * ld-arm/arm-elf.exp: Rewrite non-EABI variants of thumb2-bl-as-thumb1-bad and thumb2-bl-bad tests, which now pass. farcall-thumb-thumb now passes in EABI mode. * ld-arm/farcall-thumb-arm-pic-veneer.d: Fixed name, source, as and ld flags to match intended test. * ld-arm/farcall-thumb-arm.d: New expected result. * ld-arm/farcall-thumb-thumb-m.d: Likewise. * ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Fixed name and ld flags. * ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise. * ld-arm/farcall-thumb-thumb.d: New expected result, this test is now expected to pass. * ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: Likewise. * ld-arm/thumb2-bl-bad-noeabi.d: Likewise. * ld-arm/thumb2-bl-as-thumb1-bad.d: Update addresses according to new use. * ld-arm/thumb2-bl-as-thumb1-bad.s: Update comment.
* 2009-02-18 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-02-181-2/+5
| | | | | | | | | | | | | | | bfd/ * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic stub. Catch default case error. (arm_map_one_stub): Add missing Thumb mapping symbol. testsuite/ * ld-arm/farcall-arm-arm-pic-veneer.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d, ld-arm/farcall-arm-thumb-pic-veneer.d, ld-arm/farcall-thumb-arm-blx-pic-veneer.d, ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Fix expected stub target.
* 2009-02-16 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon2009-02-181-76/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf32-arm.c (arm_long_branch_stub, arm_thumb_v4t_long_branch_stub, arm_thumb_thumb_long_branch_stub, arm_thumb_arm_v4t_long_branch_stub, arm_thumb_arm_v4t_short_branch_stub, arm_pic_long_branch_stub): Renamed to elf32_arm_stub_long_branch_any_any, elf32_arm_stub_long_branch_v4t_arm_thumb, elf32_arm_stub_long_branch_thumb_only, elf32_arm_stub_long_branch_v4t_thumb_arm, elf32_arm_stub_short_branch_v4t_thumb_arm, elf32_arm_stub_long_branch_any_any_pic. (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch, arm_thumb_thumb_stub_long_branch, arm_thumb_arm_v4t_stub_long_branch, arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch): Renamed to arm_stub_long_branch_any_any, arm_stub_long_branch_v4t_arm_thumb, arm_stub_long_branch_thumb_only, arm_stub_long_branch_v4t_thumb_arm, arm_stub_short_branch_v4t_thumb_arm, arm_stub_long_branch_any_any_pic.
* 2009-01-30 Julian Brown <julian@codesourcery.com>Joseph Myers2009-01-301-0/+6
| | | | | | * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with EXEC_P or DYNAMIC flags, and skip sections which are being linked with --just-symbols (-R).
* * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC andCatherine Moore2009-01-281-1/+1
| | | | SEC_LOAD for dynamic relocation sections.
* 2009-01-19 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2009-01-191-0/+19
| | | | | | | | | | | | | | bfd/ * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering. * elf-bfd.h (elf_backend_data): Add obj_attrs_order. * elf32-arm.c (elf32_arm_obj_attrs_order): New function. (elf_backend_obj_attrs_order): New define. * elfxx-target.h (elf_backend_obj_attrs_order): New define. (elfNN_bed): Add elf_backend_obj_attrs_order. gas/testsuite/ * gas/arm/attr-order.d: New file. * gas/arm/attr-order.s: New file.
* 2009-01-19 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2009-01-191-6/+6
| | | | | | | | | | | | | | | bfd/ * elf-attrs.c (is_default_attr): Substitute magic numbers with macros. (obj_attr_size): Likewise. (write_obj_attribute): Likewise. (_bfd_elf_copy_obj_attributes): Likewise. (_bfd_elf_parse_attributes): Likewise. * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define. (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines. (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines. (ATTR_TYPE_HAS_NO_DEFAULT): New define. * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers with macros.
* 2009-01-19 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2009-01-191-5/+6
| | | | | | | | | | | | | | | | | bfd/ * elf-attrs.c (is_default_attr): Support defaultless attributes. (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type. (bfd_elf_add_obj_attr_string): Likewise. (bfd_elf_add_obj_attr_int_string): Likewise. (_bfd_elf_parse_attributes): Allow for unknown flag bits in type. * elf-bfd.h (struct obj_attribute): Document new flag bit. * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that Tag_nodefaults has no default value. (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults comment to reflect the new state. gas/ * read.c (s_vendor_attribute): Allow for unknown flag bits in type.
* 2009-01-15 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2009-01-151-129/+478
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Julian Brown <julian@codesourcery.com> bfd/ * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known ARM attributes in ABI 2.07. * elf32-arm.c (get_secondary_compatible_arch): New function. (set_secondary_compatible_arch): New function. (tag_cpu_arch_combine): New function. (elf32_arm_copy_one_eabi_other_attribute): Delete function. (elf32_arm_copy_eabi_other_attribute_list): Delete function. (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to make it fit with order_01243. Add support for Tag_also_compatible_with, Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use, Tag_MPextension_use, Tag_nodefaults and Tag_conformance. Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name, Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension, Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed, Tag_VFP_arch and Tag_ABI_FP_16bit_format. Rework the way unknown attributes are handled. Defer errors until all attributes have been processed. gas/ * config/tc-arm.c (cpu_arch): Change ARM_ARCH_V6M to 11. include/elf/ * arm.h (TAG_CPU_ARCH_V6_M, TAG_CPU_ARCH_V6S_M): New defines. (MAX_TAG_CPU_ARCH, TAG_CPU_ARCH_V4T_PLUS_V6_M): New defines. (Tag_NEON_arch): Rename to Tag_Advanced_SIMD_arch to match ARM ABI version 2.07. (Tag_undefined39, Tag_nodefaults): New enum values. (Tag_also_compatible_with, Tag_T2EE_use): Likewise. (Tag_conformance, Tag_Virtualization_use): Likewise. (Tag_undefined69, Tag_MPextension_use): Likewise.
* 2009-01-15 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2009-01-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to bfd_elf_add_obj_attr_int_string. Read Tag_compatibility from its new location in the attribute array, rather than the attribute list. (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat -> bfd_elf_add_obj_attr_int_string. (_bfd_elf_parse_attributes): Likewise. (_bfd_elf_merge_object_attributes): There's now only one Tag_compatibility, and it's in the array, not the list. * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include Tag_compatibility. (bfd_elf_add_obj_attr_compat): Rename to bfd_elf_add_obj_attr_int_string. (bfd_elf_add_proc_attr_compat): Rename to bfd_elf_add_proc_attr_int_string. * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle Tag_compatibility. gas/ * read.c (s_vendor_attribute): bfd_elf_add_obj_attr_compat -> bfd_elf_add_obj_attr_int_string.
* PR 7093Nick Clifton2008-12-231-0/+4
| | | | | * elf32-arm.c (bfd_elf32_arm_init_maps): Only process ARM ELF object files.
* Remove STT_IFUNC support.Nick Clifton2008-12-231-5/+3
|
* include/elf/Nick Clifton2008-12-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.h (STT_IFUNC): Define. elfcpp/ * elfcpp.h (enum STT): Add STT_IFUNC. bfd/ * syms.c (struct bfd_symbol): Add new flag BSF_INDIRECT_FUNCTION. Remove redundant flag BFD_FORT_COMM_DEFAULT_VALUE. Renumber flags to remove gaps. (bfd_print_symbol_vandf): Return 'i' for BSF_INDIRECT_FUNCTION. (bfd_decode_symclass): Likewise. * elf.c (swap_out_syms): Translate BSF_INDIRECT_FUNCTION into STT_IFUNC. (elf_find_function): Treat STT_IFUNC in the same way as STT_FUNC. (_bfd_elf_is_function_type): Likewise. * elf32-arm.c (arm_elf_find_function): Likewise. (elf32_arm_adjust_dynamic_symbol): Likewise. (elf32_arm_swap_symbol_in): Likewise. (elf32_arm_additional_program_headers): Likewise. * elf32-i386.c (is_indirect_symbol): New function. (elf_i386_check_relocs): Also generate dynamic relocs for relocations against STT_IFUNC symbols. (allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (is_indirect_symbol): New function. (elf64_x86_64_check_relocs): Also generate dynamic relocs for relocations against STT_IFUNC symbols. (allocate_dynrelocs): Likewise. (elf64_x86_64_relocate_section): Likewise. * elfcode.h (elf_slurp_symbol_table): Translate STT_IFUNC into BSF_INDIRECT_FUNCTION. * elflink.c (_bfd_elf_adjust_dynamic_reloc_section): Add support for STT_IFUNC symbols. (get_ifunc_reloc_section_name): New function. (_bfd_elf_make_ifunc_reloc_section): New function. * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs field. * bfd-in2.h: Regenerate. gas/ * config/obj-elf.c (obj_elf_type): Add support for STT_IFUNC type. * doc/as.texinfo: Document new feature. * NEWS: Mention new feature. gas/testsuite/ * gas/elf/type.s: Add test of STT_IFUNC symbol type. * gas/elf/type.e: Update expected disassembly. * gas/elf/elf.exp: Update grep of symbol types. ld/ * NEWS: Mention new feature. * pe-dll.c (process_def_file): Replace use of redundant BFD_FORT_COMM_DEFAULT_VALUE with 0. * scripttempl/elf.sc: Add .rel.ifunc.dyn and .rela.ifunc.dyn sections. ld/testsuite/ * ld-mips-elf/reloc-1-n32.d: Updated expected output for reloc descriptions. * ld-mips-elf/reloc-1-n64.d: Likewise. * ld-i386/ifunc.d: New test. * ld-i386/ifunc.s: Source file for the new test. * ld-i386/i386.exp: Run the new test.
* bfd:Joseph Myers2008-11-251-2/+3
| | | | | | | | | | * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn branches to undefine weak symbols into branches to the next instruction if creating PLT entries for those symbols. ld/testsuite: * ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New. * ld-arm/arm-elf.exp: Run thumb2-bl-undefweak test.
* * elflink.c (is_reloc_section): New function. Returns true if theNick Clifton2008-11-251-52/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | given name matches the name of the reloc-containing section associated with the given section. (get_dynamic_reloc_section_name): New function. Computes the name of the section that contains the dynamic relocs associated with the given section. (_bfd_elf_get_dynamic_reloc_section): New function. Returns a pointer to the section containing the dynamic relocs associated with the given section. (_bfd_elf_make_dynamic_reloc_section): New function. Creates a section to contain the dynamic relocs associated with a given section. * elf-bfd.h: Prototype the new functions. * elf-m10300.c (mn10300_elf_check_relocs): Use new functions. (mn10300_elf_final_link_relocs): Likewise. * elf32-arm.c (reloc_section_p): Delete - replaced by new functions. (elf32_arm_final_link_relocate): Use new functions. (elf32_arm_check_relocs): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. (elf_cris_check_relocs): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-i370.c (i370_elf_check_relocs): Likewise. (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. (m32r_elf_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32_ppc.c (ppc_elf_check_relocs): Likewise. (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. (sh_elf_check_relocs): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. (elf_vax_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. * elf32-bfin.c (bfin_check_relocs): Remove redundant local variable 'sreloc'. (bfin_relocate_section): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise.
* Add support for ARM half-precision conversion instructions.Catherine Moore2008-11-181-7/+88
|
* * elf32-arm.c: Fix up comment describing Thumb to ARM interworkingNick Clifton2008-08-261-3/+4
| | | | stub.
* bfd/Nick Clifton2008-08-261-4/+71
| | | | | | | | | | | | | | | | | | * elf32-arm.c (arm_thumb_arm_v4t_short_branch_stub): Define. (elf32_arm_stub_type): Add arm_thumb_arm_v4t_stub_short_branch. (arm_type_of_stub): Handle armv4t short branches. Update prototype. (arm_stub_is_thumb): Handle arm_thumb_arm_v4t_stub_short_branch. (arm_build_one_stub): Likewise. (arm_size_one_stub): Likewise. (elf32_arm_size_stubs): Use new arm_type_of_stub prototype. (arm_map_one_stub): Handle arm_thumb_arm_v4t_stub_short_branch. ld/testsuite/ * ld-arm/arm-elf.exp: Add farcall-thumb-arm-short test. * ld-arm/farcall-group2.s: Fix comment. * ld-arm/farcall-thumb-arm-short.d: New test. * ld-arm/farcall-thumb-arm-short.s: New test.
* * elf32-arm.c: Tidy up the code.Nick Clifton2008-08-171-216/+148
| | | | | | | | | (bfd_elf32_arm_allocate_interworking_sections): Move common code into... (arm_allocate_glue_section_space): ... New function. (bfd_elf32_arm_add_glue_sections_to_bfd): Move common code into... (arm_make_glue_section): ... New function.
* * elf32-arm.c (arm_map_one_stub): Declare variables at beginningAlan Modra2008-07-281-1/+2
| | | | | of block. * elf32-avr.c (get_local_syms): Likewise.
* bfd:Joseph Myers2008-07-181-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter. * bfd-in2.h: Regenerate. * elf32-arm.c (struct elf_arm_obj_tdata): Add field no_wchar_size_warning. (bfd_elf32_arm_set_target_relocs): Add new parameter no_wchar_warn. (elf32_arm_merge_eabi_attributes): Give a warning, not an error, for conflicting wchar_t attributes. Do not warn if --no-wchar-size-warning. Make diagnostic text more specific. ld: * ld.texinfo (--no-wchar-size-warning): Document new ARM option. * emultempl/armelf.em (no_wchar_size_warning): New. (arm_elf_create_output_section_statements): Pass no_wchar_size_warning to arm_elf_create_output_section_statements. (OPTION_NO_WCHAR_SIZE_WARNING): New. (PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning. (PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning. (PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning. ld/testsuite: * ld-arm/attr-merge-wchar-0.s,ld-arm/attr-merge-wchar-2.s, ld-arm/attr-merge-wchar-4.s, ld-arm/attr-merge-wchar-00-nowarn.d, ld-arm/attr-merge-wchar-00.d, ld-arm/attr-merge-wchar-02-nowarn.d, ld-arm/attr-merge-wchar-02.d, ld-arm/attr-merge-wchar-04-nowarn.d, ld-arm/attr-merge-wchar-04.d, ld-arm/attr-merge-wchar-20-nowarn.d, ld-arm/attr-merge-wchar-20.d, ld-arm/attr-merge-wchar-22-nowarn.d, ld-arm/attr-merge-wchar-22.d, ld-arm/attr-merge-wchar-24-nowarn.d, ld-arm/attr-merge-wchar-24.d, ld-arm/attr-merge-wchar-40-nowarn.d, ld-arm/attr-merge-wchar-40.d, ld-arm/attr-merge-wchar-42-nowarn.d, ld-arm/attr-merge-wchar-42.d, ld-arm/attr-merge-wchar-44-nowarn.d, ld-arm/attr-merge-wchar-44.d: New. * ld-arm/arm-elf.exp: Run new tests.
* 2008-07-18 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2008-07-181-0/+7
| | | | | | PR ld/6748 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize new fields added for ARM long call support.
* * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols inNick Clifton2008-07-071-1/+1
| | | | the presence of a PLT.
* * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):Daniel Jacobowitz2008-06-301-3/+8
| | | | | Expand comments. (arm_map_one_stub): Use | 1 when setting the low bit.
* * elf32-arm.c (STUB_ENTRY_NAME): Define.Daniel Jacobowitz2008-06-251-54/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n. (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of R_ARM_ABS32. (struct elf32_arm_stub_hash_entry): Add output_name. (arm_build_one_stub): Move offsets into the offset argument of _bfd_final_link_relocate. Correct offset for arm_thumb_arm_v4t_stub_long_branch. (elf32_arm_size_stubs): Set stub_entry->output_name. (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym. Update all callers. (elf32_arm_output_stub_sym): New. (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym. * ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d, ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d, ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d, ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d, ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d, ld-arm/farcall-thumb-arm-blx-pic-veneer.d, ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm.d, ld-arm/farcall-thumb-thumb-blx-pic-veneer.d, ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d, ld-arm/thumb2-bl-as-thumb1-bad.d, ld-arm/thumb2-bl-bad.d: Update for stub symbols and stub corrections.
* 2008-06-09 Paul Brook <paul@codesourcery.com>Paul Brook2008-06-091-0/+1
| | | | | | bfd/ * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared libraries.
* 2008-06-03 Christophe Lyon <christophe.lyon@st.com>Daniel Jacobowitz2008-06-091-3/+27
| | | | | | | | | | 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-06-06 Paul Brook <paul@codesourcery.com>Paul Brook2008-06-061-0/+11
| | | | | bfd/ * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
* bfd/Nick Clifton2008-05-231-52/+98
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Multi-GOT support for m68k.Nick Clifton2008-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
OpenPOWER on IntegriCloud