aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-122010-02-12 Daniel Gutson <dgutson@codesourcery.com>Daniel Gutson1-1/+30
bfd/ * elf32-arm.c (elf32_arm_output_arch_local_syms): add missing mapping symbol to data only sections. ld/testsuite/ * ld-arm/arm-elf.exp (armelftests): New test case added. * ld-arm/data-only-map.s: New file. * ld-arm/data-only-map.d: New file. * ld-arm/data-only-map.ld: New file.
2010-02-08bfd/Nathan Sidwell1-1/+2
* elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty apuinfo sections, only scan input sections once and reuse the buffer. ld/testsuite/ * ld-powerpc/apuinfo-nul.s: New. * ld-powerpc/apuinfo.rd: Add it. * ld-powerpc/powerpc.exp: Likewise.
2010-02-04 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. AddNick Clifton1-37/+104
entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. * emultempl/alphaelf.em: Update value expected from elf_object_id. * emultempl/hppaelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise.
2010-01-19 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize ofAlan Modra1-3/+3
R_ARM_THM_CALL entry. (elf32_arm_final_link_relocate): Correct calculation of reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22, or R_ARM_THM_JUMP24 relocation.
2009-12-28 bfd/Daniel Gutson1-2/+7
* elf32-arm.c (elf32_arm_final_link_relocate): limits fixed. ld/testsuite/ * ld-arm/arm-elf.exp (armelftests): New test case added. * ld-arm/reloc-boundaries.s: New file. * ld-arm/reloc-boundaries.d: New file.
2009-12-11Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton1-43/+42
Fix up all warnings generated by the addition of this switch.
2009-12-09 bfd/Daniel Jacobowitz1-1/+1
* elf32-arm.c (elf32_arm_next_input_section): Skip sections without SEC_CODE. ld/testsuite/ * ld-arm/arm-elf.exp (armeabitests): Add farcall-data. * ld-arm/farcall-data.d, ld-arm/farcall-data.s: New. * lib/ld-lib.exp (run_ld_link_tests, run_cc_link_tests): Correct regular expression for archives.
2009-11-172009-11-17 Paul Brook <paul@codesourcery.com>Paul Brook1-4/+25
Daniel Jacobowitz <dan@codesourcery.com> gas/ * doc/c-arm.texi: Document .arch armv7e-m. * config/tc-arm.c (arm_ext_v6_dsp, arm_ext_v7m): New. (insns): Put Thumb versions of v5TExP instructions into arm_ext_v5exp also. Move some Thumb variants from arm_ext_v6_notm to arm_ext_v6_dsp. (arm_archs): Add armv7e-m architecture. (aeabi_set_public_attributes): Handle -march=armv7e-m. gas/testsuite/ * gas/arm/attr-march-armv7em.d: New test. * gas/arm/arch7em-bad.d: New test. * gas/arm/arch7em-bad.l: New test. * gas/arm/arch7em.d: New test. * gas/arm/arch7em.s: New test. include/elf/ * arm.h (TAG_CPU_ARCH_V7E_M): Define. include/opcode/ * arm.h (ARM_EXT_V6_DSP): Define. (ARM_AEXT_V6T2, ARM_AEXT_NOTM): Include ARM_EXT_V6_DSP. (ARM_AEXT_V7EM, ARM_ARCH_V7EM): Define. binutils/ * readelf.c (arm_attr_tag_CPU_arch): Add v7E-M. bfd/ * elf32-arm.c (using_thumb_only, arch_has_arm_nop, arch_has_thumb2_nop): Handle TAG_CPU_ARCH_V7E_M. (tag_cpu_arch_combine): Ditto. Correct MAX_TAG_CPU_ARCH test.
2009-11-022009-11-02 Paul Brook <paul@codesourcery.com>Paul Brook1-8/+44
ld/testsuite/ * ld-arm/arm-elf.exp: Add new attr-merge-vfp tests. * ld-arm/attr-merge-vfp-1.d: New test. * ld-arm/attr-merge-vfp-1r.d: New test. * ld-arm/attr-merge-vfp-2.d: New test. * ld-arm/attr-merge-vfp-2r.d: New test. * ld-arm/attr-merge-vfp-3.d: New test. * ld-arm/attr-merge-vfp-3r.d: New test. * ld-arm/attr-merge-vfp-4.d: New test. * ld-arm/attr-merge-vfp-4r.d: New test. * ld-arm/attr-merge-vfp-5.d: New test. * ld-arm/attr-merge-vfp-5r.d: New test. * ld-arm/attr-merge-vfp-2.s: New test. * ld-arm/attr-merge-vfp-3.s: New test. * ld-arm/attr-merge-vfp-3-d16.s: New test. * ld-arm/attr-merge-vfp-4.s: New test. * ld-arm/attr-merge-vfp-4-d16.s: New test. gas/ * doc/c-arm.texi: Document new -mfpu options. * config/tc-arm.c (fpu_vfp_ext_v3xd, fpu_vfp_fp16, fpu_neon_ext_fma, fpu_vfp_ext_fma): New. (NEON_ENC_TAB): Add vfma, vfms, vfnma and vfnms. (do_vfp_nsyn_fma_fms, do_neon_fmac): New functions. (insns): Move double precision load/store. Split out double precision VFPv3 instrucitons. Add VFPv4 instructions. (arm_fpus): Add VFPv3-FP16, VFPv3xD and VFPv4 variants. (aeabi_set_public_attributes): Set VFPv4 variants gas/testsuite/ * gas/arm/attr-mfpu-vfpv4.d: New test. * gas/arm/attr-mfpu-vfpv4-d16.d: New test. * gas/arm/neon-fma-cov.d: New test. * gas/arm/neon-fma-cov.s: New test. * gas/arm/vfp-fma-inc.s: New test. * gas/arm/vfp-fma-arm.d: New test. * gas/arm/vfp-fma-arm.s: New test. * gas/arm/vfp-fma-thumb.d: New test. * gas/arm/vfp-fma-thumb.s: New test. * gas/arm/vfma1.d: New test. * gas/arm/vfma1.s: New test. * gas/arm/vfpv3xd.d: New test. * gas/arm/vfpv3xd.s: New test. include/opcode/ * arm.h (FPU_VFP_EXT_V3xD, FPU_VFP_EXT_FP16, FPU_NEON_EXT_FMA, FPU_VFP_EXT_FMA, FPU_VFP_V3xD, FPU_VFP_V4D16, FPU_VFP_V4): Define. (FPU_ARCH_VFP_V3D16_FP16, FPU_ARCH_VFP_V3_FP16, FPU_ARCH_VFP_V3xD, FPU_ARCH_VFP_V3xD_FP16, FPU_ARCH_VFP_V4, FPU_ARCH_VFP_V4D16, FPU_ARCH_NEON_VFP_V4): Define. binutils/ * readelf.c (arm_attr_tag_VFP_arch): Add VFPv4 and VFPv4-D16. bfd/ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4 attributes. opcodes/ * arm-dis.c (coprocessor_opcodes): Update to use new feature flags. Add VFPv4 instructions.
2009-09-25 Update soruces to make alpha, arc and arm targets compile cleanlyNick Clifton1-284/+308
with -Wc++-compat: * config/tc-alpha.c: Add casts. (extended_bfd_reloc_code_real_type): New type. Used to avoid enumeration conversion warnings. (struct alpha_fixup, void assemble_insn, assemble_insn) (assemble_tokens): Use new type. * ecoff.c: Add casts. (mark_stabs): Use enumeration names. * config/obj-elf.c: Add cast * config/tc-arc.c: Add casts. * config/obj-aout.h (text_section,data_section,bss_section): Make extern. * config/obj-elf.c: Add cast. * config/tc-arm.c: Add casts. (X, TxCE, TxCE, TxC3, TxC3w, TxCM_, TxCM, TUE, TUF, CE, CL, cCE) (cCL, C3E, xCM_, nUF, nCE_tag): Change input format to avoid the need for keywords as arguments. * ecoff.c: Add casts. * ecofflink.c: Add casts. * elf64-alpha.c: Add casts. (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move to top level. (SKIP_HOWTO): Use enum name. * elf32-arm.c: Add casts. (elf32_arm_vxworks_bed): Update code to avoid multiple declarations. (struct map_stub): Move to top level. * arc-dis.c Fix casts. * arc-ext.c: Add casts. * arm-dis.c (enum opcode_sentinel_enum): Gave name to anonymous enum. * emultempl/armelf.em: Add casts.
2009-09-09 bfd/Daniel Jacobowitz1-8/+15
* elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags for the mode of target PLT entries. (allocate_dynrelocs): Only adjust symbol type if setting its value. ld/testsuite/ * ld-arm/farcall-mixed-lib.d: Update.
2009-08-29 Updated sources to avoid using the identifier name "new", which is aNick Clifton1-39/+43
keyword in c++. * bfd/aoutx.h (NAME (aout, make_empty_symbol)): Rename variable new to new_symbol. * bfd/coffgen.c (coff_make_empty_symbol) (coff_bfd_make_debug_symbol): Rename variable new to new_symbol. * bfd/cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable new to new_insn. * bfd/doc/chew.c (newentry, add_intrinsic): Rename variable new to new_d. * bfd/ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new to new_symbol. * bfd/elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument new to new_reloc. * bfd/hash.c (bfd_hash_lookup): Rename variable new to new_string. * bfd/ieee.c (ieee_make_empty_symbol): Rename variable new to new_symbol. * bfd/linker.c (bfd_new_link_order): Rename variable new to new_lo. * bfd/mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to symbol. * bfd/oasys.c (oasys_make_empty_symbol): Rename variable new to new_symbol_type. * bfd/pdp11.c (NAME (aout, make_empty_symbol)): Rename variable new to new_symbol_type. * bfd/plugin.c (bfd_plugin_make_empty_symbol): Rename variable new to new_symbol. * bfd/rs6000-core.c (CoreHdr, VmInfo): Rename union member new to new_dump. (read_hdr, rs6000coff_core_p) (rs6000coff_core_file_matches_executable_p) (rs6000coff_core_file_failing_command) (rs6000coff_core_file_failing_signal): Updated function to use new union member name. * bfd/som.c (som_make_empty_symbol): Rename variable new to new_symbol_type. * bfd/syms.c (_bfd_generic_make_empty_symbol): Rename variable new to new_symbol. * bfd/tekhex.c (first_phase, tekhex_make_empty_symbol): Rename variable new to new_symbol. * binutils/nlmconv.c (main): Rename variable new to new_name. * gas/config/tc-arm.c (insert_reg_alias): Rename variable new to new_reg. * gas/config/tc-dlx.c (parse_operand): Rename variable new to new_pos. * gas/config/tc-ia64.c (ia64_gen_real_reloc_type): Rename variable new to newr. * gas/config/tc-mcore.c (parse_exp, parse_imm): Rename variable new to new_pointer. * gas/config/tc-microblaze.c (parse_exp, parse_imm, check_got): Change name from new to new_pointer. * gas/config/tc-or32.c (parse_operand): Rename variable new to new_pointer. * gas/config/tc-pdp11.c (md_assemble): Rename variable new to new_pointer. * gas/config/tc-pj.c (alias): Change argument new to new_name. * gas/config/tc-score.c (s3_build_score_ops_hsh): Rename variable new to new_opcode. (s3_build_dependency_insn_hsh) Rename variable new to new_i2n. (s3_convert): Rename variables old and new to r_old and r_new. * gas/config/tc-score7.c (s7_build_score_ops_hsh): Rename variable new to new_opcode. (s7_build_dependency_insn_hsh): Rename variable new to new_i2d. (s7_b32_relax_to_b16, s7_convert_frag): Rename variables old and new to r_old and r_new. * gas/config/tc-sh.c (parse_exp): Rename variable new to new_pointer. * gas/config/tc-sh64.c (shmedia_parse_exp): Rename variable new to new_pointer. * gas/config/tc-tic4x.c (tic4x_operand_parse): Rename variable new to new_pointer. * gas/config/tc-z8k.c (parse_exp): Rename variable new to new_pointer. * gas/listing.c (listing_newline): Rename variable new to new_i. * ld/ldexp.c (exp_intop, exp_bigintop, exp_relop, exp_binop) (exp_trinop, exp_unop, exp_nameop, exp_assop): Rename variable new to new_e. * ld/ldfile.c (ldfile_add_library_path): Rename variable new to new_dirs. (ldfile_add_arch): Rename variable new to new_arch. * ld/ldlang.c (new_statement, lang_final, lang_add_wild) (lang_target, lang_add_fill, lang_add_data, lang_add_assignment) (lang_add_insert): Rename variable new to new_stmt. (new_afile): Added missing cast. (lang_memory_region_lookup): Rename variable new to new_region. (init_os): Rename variable new to new_userdata. (lang_add_section): Rename variable new to new_section. (ldlang_add_undef): Rename variable new to new_undef. (realsymbol): Rename variable new to new_name. * opcodes/z8kgen.c (internal, gas): Rename variable new to new_op. Updated sources to avoid using the identifier name "template", which is a keyword in c++. * bfd/elf32-arm.c (struct stub_def): Rename member template to template_sequence. (arm_build_one_stub, find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub): Rename variable template to template_sequence. * bfd/elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl): Rename variable template to template_val. * gas/config/tc-arm.c (struct asm_cond, struct asm_psr, struct asm_barrier_opt): Change member template to template_name. (md_begin): Update code to reflect new member names. * gas/config/tc-i386.c (struct templates, struct _i386_insn) (match_template, cpu_flags_match, match_reg_size, match_mem_size) (operand_size_match, md_begin, i386_print_statistics, pi) (build_vex_prefix, md_assemble, parse_insn, optimize_imm) (optimize_disp): Updated code to use new names. (parse_insn): Added casts. * gas/config/tc-ia64.c (dot_template, emit_one_bundle): Updated code to use new names. * gas/config/tc-score.c (struct s3_asm_opcode): Renamed member template to template_name. (s3_parse_16_32_inst, s3_parse_48_inst, s3_do_macro_ldst_label, s3_build_score_ops_hsh): Update code to use new names. * gas/config/tc-score7.c (struct s7_asm_opcode): Renamed member template to template_name. (s7_parse_16_32_inst, s7_do_macro_ldst_label, s7_build_score_ops_hsh): Update code to use new names. * gas/config/tc-tic30.c (md_begin, struct tic30_insn) (md_assemble): Update code to use new names. * gas/config/tc-tic54x.c (struct _tic54x_insn, md_begin) (optimize_insn, tic54x_parse_insn, next_line_shows_parallel): Update code to use new names. * include/opcode/tic30.h (template): Rename type template to insn_template. Updated code to use new name. * include/opcode/tic54x.h (template): Rename type template to insn_template. * opcodes/cris-dis.c (bytes_to_skip): Update code to use new name. * opcodes/i386-dis.c (putop): Update code to use new name. * opcodes/i386-gen.c (process_i386_opcodes): Update code to use new name. * opcodes/i386-opc.h (struct template): Rename struct template to insn_template. Update code accordingly. * opcodes/i386-tbl.h (i386_optab): Update type to use new name. * opcodes/ia64-dis.c (print_insn_ia64): Rename variable template to template_val. * opcodes/tic30-dis.c (struct instruction, get_tic30_instruction): Update code to use new name. * opcodes/tic54x-dis.c (has_lkaddr, get_insn_size) (print_parallel_instruction, print_insn_tic54x, tic54x_get_insn): Update code to use new name. * opcodes/tic54x-opc.c (tic54x_unknown_opcode, tic54x_optab): Update type to new name.
2009-08-212S09-08-21 Daniel Gutson <dgutson@codesourcery.com>Daniel Gutson1-7/+43
ld/ * ld-arm/callweak.d: Opcodes updated. * ld-arm/callweak.s: Architecture specified. * ld-arm/callweak-2.d: New test case. * ld-arm/callweak-2.s: New file. bfd/ * elf32-arm.c (arch_has_thumb2_nop): New function. (arch_has_arm_nop): New function. (elf32_arm_final_link_relocate): NOP opcodes changed. SVS: ----------------------------------------------------------------------
2009-08-10 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined localNathan Sidwell1-4/+31
symbols. (elf32_arm_final_link_relocate): Treat local undefined symbols the same as global undefined symbols. (elf32_arm_relocate_section): Give an error for local undefined non-weak symbols, unless the reloc will not use the symbol.
2009-08-06 bfd/Nathan Sidwell1-0/+10
* elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again at least once when fixing cortex-a8. ld/testsuite/ * ld-arm/arm-elf.exp: Add new test. * ld-arm/cortex-a8-fix-hdr.d: New. * ld-arm/cortex-a8-fix-hdr.s: New. * ld-arm/cortex-a8-fix-hdr.t: New.
2009-08-05 bfd/Nathan Sidwell1-13/+50
* elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm. (arm_build_one_stub): Build a8 veneers as a separate pass. (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p parameters. Use them to check if we create a different a8 fixup than the previous pass. (elf32_arm_size_stubs): Move scope of stub_changed and prev_num_a8_fixes into main loop. (elf32_arm_build_stubs): Build a8 veneers in a second pass. ld/testsuite/ * ld-arm/cortex-a8-far-1.s: New. * ld-arm/cortex-a8-far-2.s: New. * ld-arm/cortex-a8-far.d: New. * ld-arm/arm-elf.exp: Add new test.
2009-07-272009-07-27 Doug Kwan <dougkwan@google.com>Doug Kwan1-0/+1
* elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
2009-07-102009-07-10 Doug Kwan <dougkwan@google.com>Doug Kwan1-0/+2
* elf32-arm.c (stub_hash_newfunc): Initialize fields target_addend and orig_insn.
2009-07-10 * elf32-arm.c (arm_build_one_stub): Use the hash entry of theJulian Brown1-1/+4
symbol a stub entry is derived from, not the entry for the stub itself, in call to elf32_arm_final_link_relocate.
2009-07-01 PR 10072Nick Clifton1-0/+34
* elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle to R_ARM_THM_PC8 relocation.
2009-06-222009-06-22 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-7/+25
bfd/ * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as destination for defined dynamic symbols when deciding whether to insert a stub or not. (allocate_dynrelocs): Make sure functions are not marked as Thumb when actually accessed through a PLT, even when generating a shared lib. ld/testsuite: * ld-arm/farcall-mixed-app.s: Add new references to check more modes switching. * ld-arm/farcall-mixed-lib1.s: Likewise. * ld-arm/farcall-mixed-app-v5.d: Update expected result. * farcall-mixed-app.d: Likewise. * ld-arm/farcall-mixed-lib.d: Likewise.
2009-06-18 * elf-bfd.h (struct sym_sec_cache): Delete.Alan Modra1-7/+11
(struct sym_cache): New. (bfd_section_from_r_symndx): Delete prototype. (bfd_sym_from_r_symndx): Define prototype. * elf.c (bfd_section_from_r_symndx): Delete, replace with.. (bfd_sym_from_r_symndx): ..new function. * elf32-arm.c: Update all uses of struct sym_sec_cache and bfd_section_from_r_symndx to new struct and function. * elf32-bfin.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68hc1x.h: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-x86-64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-sparc.h: Likewise.
2009-06-172009-06-17 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-9/+3
* elf32-arm.c (create_got_section): Get existing .rela.got section. * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise. * elf32-lm32.c (create_got_section): Likewise. * elf32-m32r.c (create_got_section): Likewise. * elf32-ppc.c (ppc_elf_create_got): Likewise. * elf32-s390.c (create_got_section): Likewise. * elf32-sh.c (create_got_section): Likewise. * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise. * elf64-s390.c (create_got_section): Likewise. * elfxx-sparc.c (create_got_section): Likewise. * elflink.c (_bfd_elf_create_got_section): Properly initialize the GOT size.
2009-06-17Undo accidental checkin of bogus changePhil Blundell1-6/+5
2009-06-16 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offsetNick Clifton1-17/+20
to bfd_signed_vma. Cast constant operands which are used in offset related expressions to bfd_signed_vma type as appropriate.
2009-06-122009-06-10 Philip Blundell <philb@gnu.org>Phil Blundell1-6/+7
* elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if elf_sec->this_hdr == NULL.
2009-05-22 ld/Julian Brown1-121/+916
* emultempl/armelf.em (fix_cortex_a8): New. (arm_elf_before_allocation): Call bfd_elf32_arm_set_cortex_a8_fix. (arm_elf_create_output_section_statements): Add fix_cortex_a8 to bfd_elf32_arm_set_target_relocs. (OPTION_FIX_CORTEX_A8, OPTION_NO_FIX_CORTEX_A8): New. (PARSE_AND_LIST_LONGOPTS): Add [no-]fix-cortex-a8 options. (PARSE_AND_LIST_OPTIONS): Add [no-]fix-cortex-a8 options. (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_[NO_]FIX_CORTEX_A8. * ld.texinfo (--[no-]fix-cortex-a8): Briefly document new options. bfd/ * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New macros. (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b) (elf32_arm_stub_a8_veneer_blx): New stub sequences. (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond, arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx. (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields. (a8_erratum_fix, a8_erratum_reloc): New structs. (elf32_arm_link_hash_table): Add a8_erratum_fixes, num_a8_erratum_fixes, fix_cortex_a8 fields. (elf32_arm_link_hash_table_create): Zero fix_cortex_a8. (elf32_arm_add_stub): Split into two parts, creating... (elf32_arm_create_or_find_stub_sec): New function. (elf32_arm_final_link_relocate): Add forward declaration. (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2 relocations, multiple relocations per stub. (find_stub_size_and_template): New (using parts of arm_size_one_stub). (arm_size_one_stub): Use find_stub_size_and_template. (a8_reloc_compare): New. (find_thumb_glue): Add forward declaration. (cortex_a8_erratum_scan): New. (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support. (bfd_elf32_arm_set_cortex_a8_fix): New. (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument. (arm_map_one_stub): Add THUMB32_TYPE support. (a8_branch_to_stub_data): New. (make_branch_to_a8_stub): New. (elf32_arm_write_section): Add Cortex-A8 erratum workaround support. * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New. (bfd_elf32_arm_set_target_relocs): Add argument for controlling Cortex-A8 erratum workaround. * bfd-in2.h: Regenerate. ld/testsuite/ * ld-arm/cortex-a8-arm-target.s: New. * ld-arm/cortex-a8-thumb-target.s: New. * ld-arm/cortex-a8-fix-b-rel.s: New. * ld-arm/cortex-a8-fix-b-rel-arm.d: New. * ld-arm/cortex-a8-fix-b-rel-thumb.d: New. * ld-arm/cortex-a8-fix-b.s: New. * ld-arm/cortex-a8-fix-b.d: New. * ld-arm/cortex-a8-fix-bl-rel.s: New. * ld-arm/cortex-a8-fix-bl-rel-arm.d: New. * ld-arm/cortex-a8-fix-bl-rel-thumb.d: New. * ld-arm/cortex-a8-fix-bl.s: New. * ld-arm/cortex-a8-fix-bl.d: New. * ld-arm/cortex-a8-fix-bcc-rel.s: New. * ld-arm/cortex-a8-fix-bcc-rel-thumb.d: New. * ld-arm/cortex-a8-fix-bcc.s: New. * ld-arm/cortex-a8-fix-bcc.d: New. * ld-arm/cortex-a8-fix-blx-rel.s: New. * ld-arm/cortex-a8-fix-blx-rel-arm.d: New. * ld-arm/cortex-a8-fix-blx-rel-thumb.d: New. * ld-arm/cortex-a8-fix-blx.s: New. * ld-arm/cortex-a8-fix-blx.d: New. * ld-arm/arm-elf.exp: Add new tests.
2009-05-21 * elf-bfd.h (struct elf_backend_dataAlan Modra1-12/+8
<elf_backend_link_output_symbol_hook>): Return an int. * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop symbols on deleted .opd entries. * elflink.c (elf_link_output_sym): Return without outputting sym if output_symbol_hook returns 2. (elf_link_output_extsym): Don't assign h->indx when symbol discarded. Abort if we must not discard sym. (elf_link_input_bfd): Similarly, don't set finfo->indices for local syms. (bfd_elf_final_link): Adjust elf_link_output_sym calls. * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for elf_backend_link_output_symbol_hook return type change. * elf32-arm.c (output_arch_syminfo): Likewise. (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise. (elf32_arm_output_arch_local_syms): Likewise. * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise. * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise. (bfd_score_elf_link_output_symbol_hook): Likewise. * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise. * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise. * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise. * elf32-spu.c (spu_elf_output_symbol_hook): Likewise. * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise. * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise. * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise. * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise. * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise. * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2009-05-152009-05-15 Andrew Stubbs <ams@codesourcery.com>Paul Brook1-0/+4
Paul Brook <paul@codesourcery.com> bfd/ * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to fix discarded sections. ld/testsuite/ * ld-arm/arm-elf.exp: Add unwind-5. * ld-arm/discard-unwind.ld: New file. * ld-arm/unwind-5.d: New test. * ld-arm/unwind-5.s: New test.
2009-05-13 * elf32-arm.c: Move sysdep.h to start of file.Andrew Jenner1-1/+1
2009-05-052009-05-05 Paul Brook <paul@codesourcery.com>Paul Brook1-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-052009-05-05 Christophe lyon <christophe.lyon@st.com>Christophe Lyon1-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.
2009-04-30bfd:Joseph Myers1-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-222009-04-22 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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.
2009-04-21 bfd/Daniel Jacobowitz1-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-172009-04-17 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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-152009-04-15 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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-022009-04-02 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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-012009-04-01 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-33/+26
bfd/ * elf32-arm.c (group_sections): Rewrite loops for better readability.
2009-03-28 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", notMark Mitchell1-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.
2009-03-17 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.Daniel Jacobowitz1-2/+2
2009-03-13 PR 9934Nick Clifton1-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.
2009-03-0609-03-05 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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-052009-03-05 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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-262009-02-26 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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.
2009-02-24 bfd/Daniel Jacobowitz1-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-242009-02-24 Joseph Myers <joseph@codesourcery.com>Daniel Jacobowitz1-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.
2009-02-24 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.Daniel Jacobowitz1-7/+9
Fix formatting. (arm_size_one_stub): Remove unnecessary break. (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
2009-02-232009-02-23 Christophe Lyon <christophe.lyon@st.com>Daniel Jacobowitz1-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-232009-02-23 Christophe Lyon <christophe.lyon@st.com>Christophe Lyon1-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.