aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2009-05-24 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memoryAlan Modra2-2/+11
for BFD_IN_MEMORY is cleared. (bfd_bwrite): Zero excess memory allocated.
2009-05-24daily updateAlan Modra1-1/+1
2009-05-23daily updateAlan Modra1-1/+1
2009-05-22 ld/Julian Brown4-123/+959
* 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-22Run "make dep-am" and regenerateAlan Modra5-63/+65
2009-05-22daily updateAlan Modra1-1/+1
2009-05-21 * elflink.c (elf_link_input_bfd): Correct *pindex change in lastAlan Modra2-2/+5
commit.
2009-05-21 * elf-bfd.h (struct elf_backend_dataAlan Modra19-85/+139
<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-21 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault onAlan Modra2-0/+12
out of range .opd symbols.
2009-05-21 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, notDave Korn3-36/+36
fprintf_vma directly. * peXXigen.c (pe_print_edata): Likewise. (pe_print_pdata): Likewise. (_bfd_XX_print_ce_compressed_pdata): Likewise. (_bfd_XX_print_private_bfd_data_common): Likewise.
2009-05-21daily updateAlan Modra1-1/+1
2009-05-20Reformat.H.J. Lu1-1/+1
2009-05-20daily updateAlan Modra1-1/+1
2009-05-19==> bfd/ChangeLog <==Dave Korn2-0/+13
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com> * cofflink.c (process_embedded_commands): Ignore "-aligncomm". ==> gas/ChangeLog <== 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com> * NEWS: Mention new feature. * config/obj-coff.c (obj_coff_common_parse): New function. (obj_coff_comm): Likewise. (coff_pseudo_table): Override default ".comm" definition on PE. * doc/as.texinfo: Document new feature. ==> gas/testsuite/ChangeLog <== 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com> * gas/pe/: New directory for PE format-specific tests. * gas/pe/aligncomm-a.d: New test pattern file. * gas/pe/aligncomm-a.s: New test source file. * gas/pe/aligncomm-b.d: New test pattern file. * gas/pe/aligncomm-b.s: New test source file. * gas/pe/aligncomm-c.d: New test pattern file. * gas/pe/aligncomm-c.s: New test source file. * gas/pe/aligncomm-d.d: New test pattern file. * gas/pe/aligncomm-d.s: New test source file. * gas/pe/pe.exp: New test control script. * lib/gas-defs.exp (is_pecoff_format): New function. ==> ld/ChangeLog <== 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com> * NEWS: Mention new feature. * deffile.h (def_file_aligncomm): Add new struct definition. (def_file): Add new def_file_aligncomm member. * deffilep.y (%token): Add new ALIGNCOMM token. (command): Add production rule for ALIGNCOMM. (def_file_free): Free any chained def_file_aligncomm structs. (diropts[]): Add entry for '-aligncomm' .drectve command. (def_aligncomm): New grammar function. * ld.texinfo: Document new feature. * pe-dll.c (process_def_file): Rename from this ... (process_def_file_and_drectve): ... to this, updating all callers, and process any aligncomms chained to the def file after scanning all .drectve sections. (generate_edata): Updated to match. (pe_dll_build_sections): Likewise. ==> ld/testsuite/ChangeLog <== 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com> * ld-pe/aligncomm-1.c: New test source file. * ld-pe/aligncomm-2.c: Likewise. * ld-pe/aligncomm-3.c: Likewise. * ld-pe/aligncomm-4.c: Likewise. * ld-pe/aligncomm.d: New test pattern file. * ld-pe/direct.exp: Deleted, and content moved into ... * ld-pe/pe-run.exp: ... New common file for all PE run tests. * ld-pe/vers-script.exp: Deleted, and content merged into ... * ld-pe/pe-compile.exp: ... New common file for PE tests needing a compiler, adding aligned common tests. * ld-pe/pe.exp: Update header comment.
2009-05-19daily updateAlan Modra1-1/+1
2009-05-18daily updateAlan Modra1-1/+1
2009-05-17daily updateAlan Modra1-1/+1
2009-05-16daily updateAlan Modra1-1/+1
2009-05-152009-05-15 Andrew Stubbs <ams@codesourcery.com>Paul Brook2-0/+10
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-15daily updateAlan Modra1-1/+1
2009-05-14 * elf32-spu.c (mark_overlay_section): Move .init and .finiUlrich Weigand2-1/+8
sections into the software icache.
2009-05-14bfd/Ulrich Weigand2-53/+30
* elf32-spu.c (build_stub): Always build "compact" sofware i-cache stubs. ld/ * emultempl/spuelf.em (PARSE_AND_LIST_ARGS_CASES): Always use compact stubs with software i-cache. ld/testsuite/ * ld-spu/icache1.d: Update for compact stubs.
2009-05-14bfd/Ulrich Weigand2-40/+104
* elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2. (spu_elf_setup): Initialize it. (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache. Update to new-sytle cache manager data structures. (spu_elf_build_stubs): Generate new-style cache manager data structures and symbols. (spu_elf_auto_overlay): Update size computation. ld/testsuite/ * ld-spu/icache1.d: Update all addresses to accomodate icache buffer shifted down 0x800 bytes.
2009-05-14bfd/Ulrich Weigand2-1/+38
* elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY segments first amongst the program headers. ld/testsuite/ * ld-spu/icache.d: Update file offsets. * ld-spu/ovl.d: Likewise. * ld-spu/ovl1.d: Likewise.
2009-05-14 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay indexUlrich Weigand2-8/+8
into addresses for relocation types that look at high bits. Remove special handling of relocation overflow warnings.
2009-05-14 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in theUlrich Weigand2-1/+13
control flow graph between fragments of a function.
2009-05-14 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,Ulrich Weigand2-4/+10
generate only a 16-byte .toe section. (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2009-05-14bfd/Alan Modra3-9/+42
* elf32-spu.c (spu_elf_size_stubs): Split out section placement to.. (spu_elf_place_overlay_data): ..here. New function. * elf32-spu.h (spu_elf_place_overlay_data): Declare. ld/ * emultempl/spuelf.em (spu_before_allocation): Call spu_elf_place_overlay_data. ld/testsuite/ * ld-spu/icache1.d: Update for changed overlay manager placement. * ld-spu/ovl.d: Likewise. * ld-spu/ovl2.d: Likewise.
2009-05-14daily updateAlan Modra1-1/+1
2009-05-13 * elf32-arm.c: Move sysdep.h to start of file.Andrew Jenner2-1/+5
2009-05-13daily updateAlan Modra1-1/+1
2009-05-12daily updateAlan Modra1-1/+1
2009-05-11 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma asAlan Modra2-2/+19
start of overlays. (spu_elf_build_stubs): Don't define __icache_tagbase. Define __icache_tag_array and __icache_tag_array_size.
2009-05-11daily updateAlan Modra1-1/+1
2009-05-10Remove unnecessary ATTRIBUTE_UNUSEDAlan Modra2-6/+12
2009-05-10daily updateAlan Modra1-1/+1
2009-05-08daily updateAlan Modra1-1/+1
2009-05-07daily updateAlan Modra1-1/+1
2009-05-06daily updateAlan Modra1-1/+1
2009-05-052009-05-05 Paul Brook <paul@codesourcery.com>Paul Brook4-2/+417
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 Lyon2-68/+45
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-05-05daily updateAlan Modra1-1/+1
2009-05-04bfd/ChangeLogDave Korn4-76/+105
* elflink.c (find_version_for_sym): Remove from here, ... * linker.c (bfd_find_version_for_sym): ... rename, replace here, make public and update all callers. * bfd-in2.h: Regenerate. ld/ChangeLog * NEWS: Mention new feature. * ld.texinfo (--version-script): Document extent of PE support. (WIN32): Mention --version-script. Extend auto-export description. * pe-dll.c (process_def_file): Use version script info to filter symbols from auto-export. * testsuite/ld-pe/vers-script-1.d: New file. * testsuite/ld-pe/vers-script-2.d: New file. * testsuite/ld-pe/vers-script-3.d: New file. * testsuite/ld-pe/vers-script-4.d: New file. * testsuite/ld-pe/vers-script-1.ver: New file. * testsuite/ld-pe/vers-script-2.ver: New file. * testsuite/ld-pe/vers-script-3.ver: New file. * testsuite/ld-pe/vers-script-4.ver: New file. * testsuite/ld-pe/vers-script-dll.c: New file. * testsuite/ld-pe/vers-script.exp: New test script.
2009-05-04daily updateAlan Modra1-1/+1
2009-05-03daily updateAlan Modra1-1/+1
2009-05-02daily updateAlan Modra1-1/+1
2009-05-01daily updateAlan Modra1-1/+1
2009-04-30include/elfNick Clifton9-54/+336
2009-04-30 Nick Clifton <nickc@redhat.com> * common.h (STT_GNU_IFUNC): Define. elfcpp 2009-04-30 Nick Clifton <nickc@redhat.com> * (enum STT): Add STT_GNU_IFUNC. gas 2009-04-30 Nick Clifton <nickc@redhat.com> * config/obj-elf.c (obj_elf_type): Add support for a gnu_indirect_function type. * config/tc-i386.c (tc_i386_fix_adjustable): Do not adjust fixups against indirect function symbols. * doc/as.texinfo (.type): Document the support for the gnu_indirect_function symbol type. * NEWS: Mention the new feature. gas/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * gas/elf/elf.exp: Extend type test to include an ifunc symbol. Provide an alternative test for targets which do not support ifunc symbols. (type.s): Add entry for an ifunc symbol. (type.e): Add ifunc entry to expected symbol dump. (section2.e-armelf): Add entry for ifunc symbol. (type-noifunc.s): New file. (type-noifunc.e): New file. bfd/ 2009-04-30 Nick Clifton <nickc@redhat.com> * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs section pointer. (struct elf_obj_data): Add has_ifunc_symbols boolean. * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags into a STT_GNU_IFUNC symbol type. (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function type. (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if the binary contains ifunc symbols. * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC symbol type into a BSF_GNU_INDIRECT_FUNCTION flag. * elf32-i386.c (is_indirect_function): New function. (elf_i386_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf_i386_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): New function. Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. (elf_backend_add_symbol_hook): Define. (elf_i386_post_process_headers): Rename to elf_i388_fbsd_post_process_headers. * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro. (is_indirect_function): New function. (elf64_x86_64_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf64_x86_64_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT if we have ifunc symbols to handle. (get_ifunc_reloc_section_name): New function. Computes the name for an ifunc section. (_bfd_elf_make_ifunc_reloc_section): New function. Creates a section to hold ifunc relocs. * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define. (bfd_print_symbol_vandf): Handle ifunc symbols. (bfd_decode_symclass): Likewise. * bfd-in2.h: Regenerate. binutils 2009-04-30 Nick Clifton <nickc@redhat.com> * readelf.c (dump_relocations): Display a relocation against an ifunc symbol as if it were a function invocation. (get_symbol_type): Handle STT_GNU_IFUNC. ld 2009-04-30 Nick Clifton <nickc@redhat.com> * NEWS: Mention support for IFUNC symbols. ld/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * ld-ifunc: New directory. * ld-ifunc/ifunc.exp: New file: Run the IFUNC tests. * ld-ifunc/prog.c: New file. * ld-ifunc/lib.c: New file.
2009-04-30bfd:Joseph Myers2-4/+20
* 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-30daily updateAlan Modra1-1/+1