aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2011-05-31 * archive.c (adjust_relative_path): Fix comment to prevent itNick Clifton2-3/+12
corrupting the auto-generated bfd.h.
2011-05-312011-05-31 Paul Brook <paul@codesourcery.com>Paul Brook2-7/+18
bfd/ * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion for known functions. (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function symbols. include/elf/ * arm.h (arm_st_branch_type): Add ST_BRANCH_UNKNOWN. ld/testsuite/ * ld-arm/cortex-a8-far.d: Adjust expected output. * ld-arm/arm-call1.s: Give function symbol correct type. * ld-arm/arm-call2.s: Ditto. * ld-arm/farcall-group4.s: Ditto. * ld-arm/arm-elf.exp (cortex-a8-far): Define far symbols with correct type via assembly file. * ld-arm/cortex-a8-far-3.s: New file. * ld-arm/abs-call-1.s: Add Thumb tests
2011-05-312011-05-31 Paul Brook <paul@codesourcery.com>Paul Brook2-5/+25
bfd/ * elf32-arm.c (arm_stub_is_thumb): Add arm_stub_long_branch_v4t_thumb_tls_pic. (elf32_arm_final_link_relocate): TLS stubs are always ARM. Handle Thumb stubs. ld/testsuite/ * ld-arm/tls-longplt.d: Update expected output. * ld-arm/tls-thumb1.d: Ditto.
2011-05-31daily updateAlan Modra1-1/+1
2011-05-30daily updateAlan Modra1-1/+1
2011-05-29daily updateAlan Modra1-1/+1
2011-05-28daily updateAlan Modra1-1/+1
2011-05-27 PR binutils/12710Nick Clifton2-12/+89
* archive.c (_bfd_get_elt_at_filepos): Set correct error value if unable to read a file pointed to by an entry in a thin archive. (adjust_relative_path): Use lrealpath to canonicalize paths. Handle the case where the reference path is above the current path in the directory tree.
2011-05-27daily updateAlan Modra1-1/+1
2011-05-26Handle R_X86_64_TPOFF64 in executable.H.J. Lu2-0/+7
bfd/ 2011-05-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/12809 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle R_X86_64_TPOFF64 in executable. ld/testsuite/ 2011-05-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/12809 * ld-x86-64/tlsbin.s: Add a test for LE with large model. * ld-x86-64/tlsbin.dd: Updated. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsbindesc.sd: Likewise. * ld-x86-64/tlsbindesc.td: Likewise.
2011-05-26 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.Alan Modra3-7/+11
* elflink.c (_bfd_elf_symbol_refs_local_p): Expand local_protected comment.
2011-05-26daily updateAlan Modra1-1/+1
2011-05-252011-05-25 Tristan Gingold <gingold@adacore.com>Tristan Gingold8-5479/+5584
* configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec) (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec) (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c (elf32-ia64.c): Created from elfnn-ia64.c (elf64-ia64.c): Likewise. * elfxx-ia64.h: New file. * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following functions.Includes elfxx-ia64.h. (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message. (IA64_HOWTO): Adjust. (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public. (elfNN_ia64_reloc_type_lookup): Renames to ia64_elf_reloc_type_lookup. Make it public. Adjust calls. (elfNN_ia64_reloc_name_lookup): Renames to ia64_elf_reloc_name_lookup. Make it public. (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public. (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it public. (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov. Move it and make it public. Move prototype to elfxx-ia64.h (elfNN_ia64_install_value): Renames to ia64_elf_install_value. Move prototype to elfxx-ia64.h * elfnn-ia64.c: New file, split from elfxx-ia64.c. (elfNN_ia64_info_to_howto): Adjust calls. (elfNN_ia64_relax_section): Adjust calls. (count_dyn_reloc): Fix typo. (elfNN_ia64_relocate_section): Adjust calls. (elfNN_ia64_finish_dynamic_symbol): Likewise. (bfd_elfNN_bfd_reloc_type_lookup) (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
2011-05-25daily updateAlan Modra1-1/+1
2011-05-24daily updateAlan Modra1-1/+1
2011-05-23* elf32-rx.c (rx_elf_object_p): When reading an RX object in, undoDJ Delorie2-0/+55
the vma/lma swapping done in elf32_rx_modify_program_headers.
2011-05-23 * elf-m10300.c (mn10300_elf_mkobject): New function.Nick Clifton2-0/+21
(bfd_elf32_mkobject): Define.
2011-05-23 * elf-bfd.h: Comment typo fix.Alan Modra4-74/+41
* elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with struct elf_dyn_relocs throughout. * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
2011-05-23 * elf32-frv.c: Use info->callbacks->einfo throughout file in linkerAlan Modra4-213/+196
functions rather than warning callback or _bfd_error_handler. * elf32-ppc.c: Likewise. * elf64-ppc.c: Likewise. * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost arg error. * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2011-05-23 PR 12763Alan Modra2-4/+23
bfd/ * elf.c (assign_file_positions_for_load_sections): Set sh_offset for .tbss, and page align same for all SHT_NOBITS sections. ld/ * ldlang.c (lang_output_section_find_by_flags): Match orphan .sdata2 like sections to existing .sdata2, and similarly for orphan TLS sections. * emultempl/elf32.em (place_orphan): Exclude .tbss from orphan_bss.
2011-05-23daily updateAlan Modra1-1/+1
2011-05-22daily updateAlan Modra1-1/+1
2011-05-21daily updateAlan Modra1-1/+1
2011-05-20 PR 12763Alan Modra2-12/+35
* elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs from PT_TLS header. (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD segment if just for .tbss. (assign_file_positions_for_load_sections): Don't report "can't allocate in segment" errors for .tbss. (assign_file_positions_for_non_load_sections): Don't set p_filesz from SHT_NOBITS section filepos.
2011-05-20 ld/testsuite/Bernd Schmidt2-5/+49
* ld-tic6x/pcr-reloc.d: New test. * ld-tic6x/pcr-reloc.s: New test. gas/testsuite/ * gas/tic6x/pcr-relocs.d: New test. * gas/tic6x/pcr-relocs.s: New test. * gas/tic6x/pcr-relocs-undef.d: New test. * gas/tic6x/pcr-relocs-undef.s: New test. * gas/tic6x/reloc-bad-2.s: Update for pcr_offset. * gas/tic6x/reloc-bad-2.l: Update for pcr_offset. bfd/ * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for R_C6000_PCR_H16 and R_C6000_PCR_L16. (elf32_tic6x_relocate_section): Handle them. gas/ * config/tc-tic6x.c (tic6x_operators): Add "pcr_offset". (tic6x_parse_name): Handle it. (tic6x_fix_new_exp): Handle O_pcr_offset. (tic6x_fix_adjustable): Return 0 for the new relocs. (md_apply_fix): Handle them. (tc_gen_reloc): Likewise. * config/tc-tic6x.h (tic6x_fix_info): Add a fix_subsy member.
2011-05-20daily updateAlan Modra1-1/+1
2011-05-18 PR ld/12761Nick Clifton2-1/+8
* elflink.c (elf_link_add_object_symbols): Process .gnu.warning sections when building shared libraries. * lib/ld-lib.exp (run_cc_link_tests): Add an optional 8th parameter - an expected warning message from the linker. * ld-elf/shared.exp (build_tests): Expect a warning message when building the libbarw.so library. * ld-elf/shared.exp: Run library building tests even when not building a native toolchain.
2011-05-18 PR ld/12778Nick Clifton2-2/+8
* elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic reloc pointer.
2011-05-182011-05-18 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-11/+27
* xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols. (xcoff_sweep): Always keep dwarf sections. (xcoff_link_input_bfd): Handle dwarf symbols and sections.
2011-05-18bfdTristan Gingold4-2/+80
2011-05-18 Tristan Gingold <gingold@adacore.com> * libxcoff.h (struct xcoff_dwsect_name): New type. (XCOFF_DWSECT_NBR_NAMES): New macro. (xcoff_dwsect_names): Declare. * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections. (styp_to_sec_flags): Ditto. (coff_new_section_hook): Ditto. (coff_slurp_symbol_table): Handle C_DWARF and C_INFO. * coff-rs6000.c (xcoff_dwsect_name): New variable. gas 2011-05-18 Tristan Gingold <gingold@adacore.com> * config/tc-ppc.h (ppc_tc_sy): Reorder fields. Put size into an union with dw. (OBJ_COPY_SYMBOL_ATTRIBUTES): Adjust. (ppc_xcoff_end): Declare. (md_end): Define. * config/tc-ppc.c: Add includes for xcoff. (ppc_dwsect): New function. (md_pseudo_table): Add dwsect. (struct dw_subsection): New. (dw_sections): New. (ppc_change_debug_section): New function. (ppc_xcoff_end): Ditto. (ppc_function): Adjust for ppc_tc_sy. (ppc_symbol_new_hook): Ditto. (ppc_frob_symbol): Ditto. (ppc_frob_section): Do not set vma for debug sections. (ppc_fix_adjustable): Return true for debug sections. * config/obj-coff.c: Add includes for xcoff. (coff_frob_section): Handle dwarf section. gas/testsuite 2011-05-18 Tristan Gingold <gingold@adacore.com> * gas/ppc/xcoff-dwsect-1-32.d: New test. * gas/ppc/xcoff-dwsect-1-64.d: Ditto. * gas/ppc/xcoff-dwsect-1.s: New file. * gas/ppc/aix.exp (do_align_test): Add tests.
2011-05-18daily updateAlan Modra1-1/+1
2011-05-17 PR ld/12759Nick Clifton2-16/+29
* emultempl/rxelf.em (ignore_lma): New variable. (rx_elf_create_output_section_statements): Pass the setiing of ignore_lma to bfd_elf32_rx_set_target_flags. (OPTION_IGNORE_LMA): Define. (OPTION_NO_IGNORE_LMA): Define. (PARSE_AND_LIST_LONGOPTS): Add ignore lma. (PARSE_AND_LIST_OPTIONS): Add ignore lma. (PARSE_AND_LIST_ARGS_CASES): Add ignore lma. * elf32-rx.c (ignore_lma): New variable. (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter. (rx_modify_program_headers): Only copy the LMA into the VMA if ignore_lma is true.
2011-05-17 PR ld/12760Alan Modra4-5/+14
include/ * bfdlink.h (struct bfd_link_callbacks <notice>): Add "flags" and "string" param. bfd/ * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call. * elflink.c (elf_link_add_object_symbols): Likewise. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. ld/ * ldmain.c (notice): Add "flags" and "string" param. * plugin.c (plugin_notice): Likewise. Handle indirect, warning and constructor syms.
2011-05-17daily updateAlan Modra1-1/+1
2011-05-16daily updateAlan Modra1-1/+1
2011-05-15include/Alan Modra2-2/+5
* bfdlink.h (struct bfd_link_hash_entry): Remove u.undef.weak field. bfd/ * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
2011-05-15bfd/Richard Sandiford2-1/+5
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and global GOT entries for GOT_PAGE relocations against global symbols. ld/testsuite/ * lib/ld-lib.exp (run_ld_link_tests): Simplify pass/fail logic. Fail if the link command fails and if no test rules are defined. * ld-mips-elf/reloc-6a.s, ld-mips-elf/reloc-6b.s: New tests. * ld-mips-elf/mips-elf.exp: Run them.
2011-05-15daily updateAlan Modra1-1/+1
2011-05-14daily updateAlan Modra1-1/+1
2011-05-13 ld/Bernd Schmidt6-4/+83
(eelf32_tic6x_linux_be.c, eelf32_tic6x_linux_le.c, eelf32_tic6x_elf_be.c, eelf32_tic6x_elf_le.c): New rules. * Makefile.am (ALL_EMULATIONS): Add these files. (eelf32_tic6x_be.c, eelf32_tic6x_le.c): Depend on tic6xdsbt.em. * Makefile.in: Regenerated. * emultempl/tic6xdsbt.em (is_tic6x_target): Allow more tic6x target vectors. * emulparams/elf32_tic6x_elf_be.sh: New file. * emulparams/elf32_tic6x_elf_le.sh: New file. * emulparams/elf32_tic6x_linux_be.sh: New file. * emulparams/elf32_tic6x_linux_le.sh: New file. * configure.tgt (tic6x-*-elf, tic6x-*-uclinux): New. (tic6x-*-*): Replaced by these. ld/testsuite/ * ld-tic6x/dsbt.ld (OUTPUT_FORMAT): Add. * ld-tic6x/tic6x.exp: Add OSABI tests. bfd/ * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New. (tic6x-*-*): Replaced by these. * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function. (elf32_tic6x_check_relocs): Create dynamic sections if -shared. (elf_backend_relocs_compatible, elf_backend_post_process_headers): Define. (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM, TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include "elf32-target.h" two more times. * configure.in: Handle bfd_elf32_tic6x_linux_be_vec, bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and bfd_elf32_tic6x_elf_le_vec. * configure: Regenerate.
2011-05-13bfd/Jan Beulich2-1/+5
2011-05-13 Jan Beulich <jbeulich@novell.com> * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep. ld/ 2011-05-13 Jan Beulich <jbeulich@novell.com> * configure.tgt: Add targets x86_64-*-pe and x86_64-*-pep.
2011-05-13daily updateAlan Modra1-1/+1
2011-05-12bfd/Jan Kratochvil6-0/+182
* config.in: Regenerated. * configure: Regenerated. * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
2011-05-12daily updateAlan Modra1-1/+1
2011-05-11daily updateAlan Modra1-1/+1
2011-05-10bfd/Jan Kratochvil4-0/+13
* elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and 32bit psinfo. * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid. * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
2011-05-10daily updateAlan Modra1-1/+1
2011-05-092011-05-09 Paul Brook <paul@codesourcery.com>Paul Brook4-0/+486
bfd/ * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype. * bfd-in2.h: Regenerate. * elf32-tic6x.c: Include limits.h. (tic6x_unwind_edit_type, tic6x_unwind_table_edit, _tic6x_elf_section_data): New. (elf32_tic6x_section_data): Define. (elf32_tic6x_new_section_hook): Allocate target specific data. (elf32_tic6x_add_unwind_table_edit): New function. (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size, elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31, elf32_tic6x_copy_exidx_entry): New functions. (elf_backend_write_section): Define. ld/ * emultempl/tic6xdsbt.em (merge_exidx_entries): New. (compare_output_sec_vma): New function. (gld${EMULATION_NAME}_after_allocation): New function. (OPTION_NO_MERGE_EXIDX_ENTRIES): Define. (PARSE_AND_LIST_OPTIONS): Add --no-merge-exidx-entries. (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_MERGE_EXIDX_ENTRIES. (LDEMUL_AFTER_ALLOCATION): Set. * ld.texinfo: Document c6x --no-merge-exidx-entries. ld/testsuite/ * ld-tic6x/discard-unwind.ld: New. * ld-tic6x/unwind.ld: New. * ld-tic6x/unwind-1.d: New test. * ld-tic6x/unwind-1.s: New test. * ld-tic6x/unwind-2.d: New test. * ld-tic6x/unwind-2.s: New test. * ld-tic6x/unwind-3.d: New test. * ld-tic6x/unwind-3.s: New test. * ld-tic6x/unwind-4.d: New test. * ld-tic6x/unwind-4.s: New test. * ld-tic6x/unwind-5.d: New test. * ld-tic6x/unwind-5.s: New test. * ld-tic6x/unwind-6.d: New test.
2011-05-092011-05-09 Paul Brook <paul@codesourcery.com>Paul Brook2-0/+37
bfd/ * elf32-tic6x.c (is_tic6x_elf_unwind_section_name, elf32_tic6x_fake_sections): New functions. (elf_backend_fake_sections): Define. gas/ * config/tc-tic6x.c (streq): Define. (tic6x_get_unwind): New. (s_tic6x_cantunwind, s_tic6x_handlerdata, s_tic6x_endp, s_tic6x_personalityindex, s_tic6x_personality): New functions. (md_pseudo_table): Add "endp", "handlerdata", "personalityindex", "personality" and "cantunwind". (tic6x_regname_to_dw2regnum, tic6x_frame_initial_instructions, tic6x_start_unwind_section, tic6x_unwind_frame_regs, tic6x_pop_rts_offset_little, tic6x_pop_rts_offset_big, tic6x_unwind_reg_from_dwarf, tic6x_flush_unwind_word, tic6x_unwind_byte, tic6x_unwind_2byte, tic6x_unwind_uleb, tic6x_cfi_startproc, output_exidx_entry, tic6x_output_unwinding, tic6x_cfi_endproc): New. * config/tc-tic6x.h (TIC6X_NUM_UNWIND_REGS): Define. (tic6x_unwind_info): New. (tic6x_segment_info_type): Add marked_pr_dependency, unwind and text_unwind. (TARGET_USE_CFIPOP, tc_regname_to_dw2regnum, tc_cfi_frame_initial_instructions, DWARF2_DEFAULT_RETURN_COLUMN, DWARF2_CIE_DATA_ALIGNMENT, tc_cfi_startproc, tc_cfi_endproc, tc_cfi_section_name): Define. * doc/c-tic6x.texi: Document new unwinding directives. * dw2gencfi.c (tc_cfi_startproc, tc_cfi_endproc): Add default definitions. (cfi_insn_data, fde_entry, CFI_adjust_cfa_offset, CFI_return_column, CFI_rel_offset, CFI_escape, CFI_signal_frame, CFI_val_encoded_addr): Move to dw2gencfi.h. (CFI_EMIT_target): Define. (dot_cfi_sections): Check tc_cfi_section_name. (dot_cfi_startproc): Use tc_cfi_startproc. (dot_cfi_endproc): Use tc_cfi_endproc. * dw2gencfi.h (cfi_insn_data, fde_entry, CFI_adjust_cfa_offset, CFI_return_column, CFI_rel_offset, CFI_escape, CFI_signal_frame, CFI_val_encoded_addr): Move to here from dw2gencfi.c. gas/testsuite: * gas/tic6x/unwind-1.d: New test. * gas/tic6x/unwind-1.s: New test. * gas/tic6x/unwind-2.d: New test. * gas/tic6x/unwind-2.s: New test. * gas/tic6x/unwind-3.d: New test. * gas/tic6x/unwind-3.s: New test. * gas/tic6x/unwind-bad-1.d: New test. * gas/tic6x/unwind-bad-1.s: New test. * gas/tic6x/unwind-bad-1.l: New test. * gas/tic6x/unwind-bad-2.d: New test. * gas/tic6x/unwind-bad-2.s: New test. * gas/tic6x/unwind-bad-2.l: New test. include/ * elf/tic6x.h (ELF_STRING_C6000_unwind, ELF_STRING_C6000_unwind_info, ELF_STRING_C6000_unwind_once, ELF_STRING_C6000_unwind_info_once): Define.
2011-05-092011-05-09 Paul Brook <paul@codesourcery.com>Paul Brook2-0/+53
bfd/ * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function. (elf_backend_gc_mark_extra_sections): Define.