Commit Graph

8273 Commits

Author SHA1 Message Date
Alan Modra 8af6b354b4 PR 11302
* dwarf2.c (read_abbrevs): Return NULL on alloc failures.
	(read_attribute_value, decode_line_info): Likewise.
	(add_line_info, read_rangelist): Return FALSE on alloc failures.
	(arange_add, sort_line_sequences): Likewise.
	(find_abstract_instance_name): Handle failures from called funcs.
	(scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
	(find_line): Realloc to a temp, and handle alloc fail.
2010-03-04 04:01:53 +00:00
Alan Modra 693bd3b926 daily update 2010-03-03 23:00:06 +00:00
Daniel Jacobowitz 501abfe038 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
a mapping symbol to an empty section.
2010-03-03 17:56:24 +00:00
Alan Modra 8b792a0a77 daily update 2010-03-02 23:00:06 +00:00
Matthew Gretton-Dann 5488d830ec * ld/testsuite/ld-arm/arm-merge-incompatible.d: New test.
* ld/testsuite/ld-arm/arm-merge-incompatiblea.s: Likewise.
	* ld/testsuite/ld-arm/arm-merge-incompatibleb.s: Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Run the new test.
	* bfd/elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
	return value from the call to _bfd_elf_merge_object_attributes.
2010-03-02 11:40:24 +00:00
Christophe Lyon fe33d2fa46 2010-03-02 Christophe Lyon <christophe.lyon@st.com>
Alan Modra  <amodra@gmail.com>

	bfd/
	* elf32-arm.c (a8_erratum_fix): Add st_type field to record the
	destination mode of the a8 stub.
	(elf32_arm_link_hash_table): Add top_id field.
	(elf32_arm_link_hash_table_create): Initialize top_id.
	(arm_type_of_stub): Update prototype, st_type can now be updated
	by this function. Actual destination address in case of PLT is
	computed here, to help factorizing code.
	(elf32_arm_stub_name): Update prototype, use stub_type additional
	parameter to build stub name.
	(elf32_arm_get_stub_entry): Update prototype, use stub_type
	additional parameter to build stub entry.
	(arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
	put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
	Call elf32_arm_final_link_relocate to process all in-stub
	relocations.
	(elf32_arm_setup_section_lists): Update top_id.
	(cortex_a8_erratum_scan): Record stub destination mode.
	(elf32_arm_size_stubs): Update call to arm_type_of_stub according
	to new prototype.
	(elf32_arm_final_link_relocate): Enable processing of in-stub
	REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
	needed, enabling code factorization.
	(elf32_arm_final_link): Process stub sections.
	(elf32_arm_output_map_sym): Add entry to code/data map.

	ld/testsuite/
	* ld-arm/arm-elf.exp: Change .text start address for
	farcall-thumb-arm tests. Add v4t variant for farcall-mixed-lib
	test.
	* ld-arm/farcall-mixed-lib-v4t.d: New test.
	* ld-arm/farcall-mixed-lib1.s: Don't force armv5t.
	* ld-arm/farcall-mixed-lib2.s: Likewise.
	* ld-arm/arm-call.d: Update expected results.
	* ld-arm/cortex-a8-far.d: Likewise.
	* ld-arm/farcall-group-size2.d: Likewise.
	* ld-arm/farcall-group.d: Likewise.
	* ld-arm/farcall-mix.d: Likewise.
	* ld-arm/farcall-mix2.d: Likewise.
	* ld-arm/farcall-mixed-app-v5.d: Likewise.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/farcall-thumb-arm.d: Likewise.
	* ld-arm/farcall-thumb-arm-blx.d: Likewise.
	* ld-arm/farcall-thumb-arm-pic-veneer.d: Likewise.
	* ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise.
	* ld-arm/farcall-thumb-arm.s: Update test. Add a new call to
	potentially generate different types of stubs.
2010-03-02 08:19:54 +00:00
David S. Miller 679b7c76e5 * elfxx-sparc.c (struct elf_reloc_map): Delete.
(sparc_reloc_map): Delete.
	(_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
	relocation type in switch statements.
2010-03-02 07:42:37 +00:00
David S. Miller b48ca1d492 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
h->def_regular, set h->ref_regular.
	(allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
	and dynamic relocations if h->ref_regular.
2010-03-02 01:46:09 +00:00
Alan Modra 33ecebe92d daily update 2010-03-01 23:00:05 +00:00
Alan Modra 78ca12eaab daily update 2010-02-28 23:00:05 +00:00
Alan Modra 1b8c66571f daily update 2010-02-27 23:00:05 +00:00
Alan Modra 52a47f1b54 daily update 2010-02-26 23:00:04 +00:00
Alan Modra 1e21d0bdd2 daily update 2010-02-25 23:00:05 +00:00
Alan Modra dfa7b0b817 bfd/
PR ld/11304
	* elf.c (_bfd_elf_init_private_section_data): Rename need_group
	to final_link and invert.  For final link allow some flags to
	differ.  Don't specially allow flags to be all zero.
ld/
	* ldlang.c (init_os): Remove isec param.  Don't check for
	bfd_section already set or call bfd_init_private_section_data
	here.
	(exp_init_os): Update init_os call.
	(lang_add_section): Tidy.  Really don't set SEC_LINK_ONCE
	flags.  Call bfd_init_private_section_data here.
	(map_input_to_output_sections): Tidy.  Update init_os calls.
	Use os->sectype to select sec flags for lang_data_statement.
2010-02-25 03:49:15 +00:00
Alan Modra 5a15d8bf2e daily update 2010-02-24 23:00:05 +00:00
Nick Clifton d4a77f3f0c PR binutils/10858
* elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
        SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
        table.
2010-02-24 14:21:51 +00:00
Alan Modra d6824f19b8 daily update 2010-02-23 23:00:05 +00:00
Nick Clifton 17e5723725 PR 11297: Add support for 8-bit relocations to the AVR toolchain. 2010-02-23 11:38:36 +00:00
Alan Modra 4c7f0517f3 daily update 2010-02-22 23:00:04 +00:00
Alan Modra 9252e88d04 daily update 2010-02-21 23:00:04 +00:00
Alan Modra 263badd715 * reloc.c (bfd_check_overflow): When forming addrmask, shift
fieldmask left by rightshift.
	(_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
	overflow checks.
2010-02-21 22:24:03 +00:00
Alan Modra 9b2a9090e8 daily update 2010-02-20 23:00:04 +00:00
H.J. Lu c35bdf6ec6 Don't check STT_GNU_IFUNC on large common symbol.
2010-02-20  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
	STT_GNU_IFUNC on large common symbol.
2010-02-20 15:47:03 +00:00
Alan Modra 79949350e4 daily update 2010-02-19 23:00:04 +00:00
H.J. Lu c16153aed7 Don't set ELFOSABI_LINUX in dynamic ifunc-using executable.
bfd/

2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c (elf_i386_add_symbol_hook): Don't set
	has_ifunc_symbols if the symbol comes from a shared library.
	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.

ld/testsuite/

2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-ifunc/ifunc.exp: Expect System V OSABI in dynamic
	ifunc-using executable.
2010-02-19 05:07:50 +00:00
Alan Modra d0bf826b37 bfd/
* elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
	(_bfd_elf_copy_private_header_data): ..here.
	* elflink.c (_bfd_elf_size_group_sections): New function.
	(bfd_elf_size_dynamic_sections): Call it.
	* elf-bfd.h (_bfd_elf_size_group_sections): Declare.
	(_bfd_elf_fixup_group_sections): Declare.
ld/
	* ldlang.c (unique_section_p): Add os param.  Allow group
	sections to match /DISCARD/.  Update all callers.
	* emultempl/genelf.em (gld${EMULATION_NAME}_before_allocation): New.
	(LDEMUL_BEFORE_ALLOCATION): Define.
ld/testsuite/
	* ld-elf/group.ld: Discard .dropme sections.
	* ld-elf/group10.d, * ld-elf/group10.s: New test.
2010-02-19 01:47:16 +00:00
Alan Modra 21e9514afe daily update 2010-02-18 23:00:04 +00:00
Matthew Gretton-Dann cd21e5460f * bfd/elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
merging Tag_DIV_use, Tag_MPextension_use, and
	Tag_MPextension_use_legacy tags.
	* binutils/readelf.c (arm_attr_tag_Advanced_SIMD_arch): Add
	description of newly permitted attribute values.
	(arm_attr_tag_Virtualization_use): Likewise.
	(arm_attr_tag_DIV_use): Add description of new attribute.
	(arm_attr_tag_MPextension_use_legacy): Likewise.
	* gas/config/tc-arm.c (arm_convert_symbolic_attribute):
	Add Tag_DIV_use.
	* gas/doc/c-arm.texi: Likewise.
	* gas/testsuite/gas/arm/attr-order.d: Fix test for new names for
	attribute values.
	* include/elf/arm.h (Tag_MPextension_use): Renumber.
	(Tag_DIV_use): Add.
	(Tag_MPextension_use_legacy): Likewise.
	* ld/testsuite/ld-arm/attr-merge-3.attr: Fix test for new attribute
	values.
	* ld/testsuite/ld-arm/attr-merge-3b.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-unknown-1.d: Fix test now that 42
	is a recognised attribute ID.
	* ld/testsuite/ld-arm/attr-merge-unknown-1.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-6.attr: New test.
	* ld/testsuite/ld-arm/attr-merge-6a.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-6b.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-7.attr: Likewise.
	* ld/testsuite/ld-arm/attr-merge-7a.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-7b.s: Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Run the new tests.
2010-02-18 10:56:28 +00:00
Alan Modra 415f38a6d0 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
commit.  Don't write zeros for removed group members.
	(_bfd_elf_copy_private_header_data): Adjust size of group section
	when group members are removed by objcopy.
2010-02-18 00:09:06 +00:00
Alan Modra 51e139990e daily update 2010-02-17 23:00:04 +00:00
Alan Modra f7a1abe637 daily update 2010-02-16 23:00:04 +00:00
Alan Modra ee401f41ee daily update 2010-02-15 23:00:04 +00:00
Dave Korn b946d5d83a bfd/ChangeLog:
PR binutils/11280
	* configure.host (*-*-solaris2.11):  Add host define to select
	valid default code page for windres/windmc on solaris.
2010-02-15 19:25:47 +00:00
Nick Clifton ab7875de80 Updated Vietnamese translation. 2010-02-15 10:09:39 +00:00
Alan Modra 4aa2ebf7a8 daily update 2010-02-14 23:00:05 +00:00
Alan Modra 8c07da9871 daily update 2010-02-13 23:00:04 +00:00
Alan Modra 2481751d58 daily update 2010-02-12 23:00:05 +00:00
Daniel Gutson 3381116249 2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
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-12 20:52:52 +00:00
Alan Modra 809e8c5f53 daily update 2010-02-11 23:00:04 +00:00
David S. Miller 00c5099111 bfd/
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
	and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
	symbols.
	(_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
	these relocs on global symbols.
	(gdopoff): New.
	(_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
	local symbol references which are not STT_GNU_IFUNC.  Handle
	relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
	and deal with negative vs. non-negative values properly.

ld/testsuite

	* ld-sparc/gotop32.s: Add local symbol case.
	* ld-sparc/gotop64.s: Likewise.
	* ld-sparc/gotop32.rd: Adjust expected results.
	* ld-sparc/gotop32.td: Likewise.
	* ld-sparc/gotop64.dd: Likewise.
	* ld-sparc/gotop64.rd: Likewise.
	* ld-sparc/gotop64.td: Likewise.
2010-02-11 19:57:40 +00:00
Alan Modra 1677b03c90 daily update 2010-02-10 23:00:05 +00:00
Alan Modra 4d9d59e6a6 daily update 2010-02-09 23:00:05 +00:00
Tristan Gingold 1523fa24f7 2010-02-09 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
	non-external relocation.
2010-02-09 13:39:22 +00:00
Alan Modra 7865406bd6 * elf64-ppc.c (merge_got_entries): Move earlier in file.
(allocate_dynrelocs): Merge got entries here if not doing multi-toc.
	(ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
	(ppc64_elf_layout_multitoc): Don't resize if we have already
	merged got entries.
2010-02-09 12:31:01 +00:00
Martin Schwidefsky d7eeb40064 bfd/
2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

	* elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
	elfcore_write_s390_prefix): New.
	* elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
	elfcore_write_s390_prefix): New.
	(elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
	NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
	(elfcore_write_register_note): Handle .reg-s390-timer,
	.reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
	.reg-s390-prefix section.

binutils/

2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

	* readelf.c (get_note_type): Handle NT_S390_TIMER, NT_S390_TODCMP,
	NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.

include/elf/

2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

	* common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
	NT_S390_CTRS and NT_S390_PREFIX): Define.
2010-02-09 12:14:43 +00:00
Alan Modra d77c8a4bbe * elf64-ppc.c (has_small_toc_reloc): Don't define.
(makes_toc_func_call, call_check_in_progress): Shuffle flags.
	(struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
	code setting the flag.
	(ppc64_elf_next_toc_section): Group big-toc sections in
	0x80008000 chunks.
2010-02-09 12:08:19 +00:00
Alan Modra d0fae19df2 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents. 2010-02-09 11:54:52 +00:00
Alan Modra f961d9dde2 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
unsigned char.  Update variables and code using them throughout file.
	(struct ppc_link_hash_entry): Likewise for tls_mask.
2010-02-09 11:35:37 +00:00
Alan Modra 207d6484b0 daily update 2010-02-08 23:00:04 +00:00
David S. Miller d0c9aeb3fc include/
* elf/sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define.

bfd/

	* reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
	(BFD_RELOC_SPARC_IRELATIVE): Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

	* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
	and loc_hash_memory.
	(_bfd_sparc_elf_link_hash_table_free): Declare.
	* elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
	(elf_backend_add_symbol_hook, elf_backend_post_process_headers,
	bfd_elf32_bfd_link_hash_table_free): Define.
	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
	has_ifunc_symbols if STT_GNU_IFUNC.
	(bfd_elf64_bfd_link_hash_table_free): Define.
	(elf_backend_post_process_headers): Define always.
	* elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
	(sparc_reloc_map): Add entries for new IFUNC relocs.
	(_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
	(_bfd_sparc_elf_info_to_howto_ptr): Likewise.
	(elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
	elf_sparc_get_local_sym_hash): New.
	(_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
	from here...
	(_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
	local hash table.
	(_bfd_sparc_elf_link_hash_table_free): New.
	(create_ifunc_sections): New.
	(_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
	and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
	cons up a fake local hash table entry for it.  Unconditionally add
	a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
	dyn relocs for ifunc.
	(_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
	(allocate_dynrelocs):  Unconditionally emit a PLT entry when STT_GNU_IFUNC
	and h->def_regular.  Count GOT dyn relocs for ifunc.
	(allocate_local_dynrelocs): New function.
	(_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table.
	Emit dynamic relocs to irelplt when not shared.  Treat iplt like splt.
	(_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
	(_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
	in iplt/irelplt.

ld/testsuite/

	* ld-ifunc/ifunc.exp: Run for sparc.
2010-02-08 20:28:43 +00:00
David S. Miller 72fbc6e5ab bfd/
* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
	srelgot, splt, srelplt, and sgotplt members in favor of generic copies.

	* elfxx-sparc.c (create_got_section): Delete.
	(_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
	section creator does that work for us.  Use ->elf.foo instead of
	->foo where applicable.
	(_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
	where applicable.
	(allocate_dynrelocs): Likewise.
	(_bfd_sparc_elf_size_dynamic_sections): Likewise.
	(_bfd_sparc_elf_relocate_section): Likewise.
	(sparc_vxworks_build_plt_entry): Likewise.
	(_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
	(sparc_finish_dyn): Likewise.
	(sparc_vxworks_finish_exec_plt): Likewise.
	(sparc_vxworks_finish_shared_plt): Likewise.
	(_bfd_sparc_elf_finish_dynamic_sections): Likewise.

	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
	macros for visibilty and locality checks.
	(_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
	(allocate_dynrelocs): Likewise.
	(_bfd_sparc_elf_relocate_section): Likewise.
	(_bfd_sparc_elf_finish_dynamic_symbol):Likewise.

	* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
	but never used local var 'dynobj'.

	* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
	nocopyreloc.
2010-02-08 20:18:03 +00:00
Richard Sandiford 9ea2b9423f bfd/
* xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
	max_contents_size, only consider sections whose contents must
	be swapped in.
2010-02-08 20:00:54 +00:00
Alan Modra 0b8bcf0ddb * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
(ppc64_elf_size_dynamic_sections): ..and here..
	(merge_got_entries): ..rather than here.
2010-02-08 14:09:25 +00:00
Alan Modra 33c0ec9de7 bfd/
* elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
	(has_small_toc_reloc): Define.
	(ppc64_elf_check_relocs): Set the above flags.
	(ppc64_elf_edit_opd): Delete obfd param.
	(ppc64_elf_tls_optimize): Likewise.
	(ppc64_elf_edit_toc): Likewise.
	(ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
	* elf64-ppc.h: Update prototypes.
ld/
	* emultempl/ppc64elf.em (ppc_before_allocation): Update for changed
	function parameters.
2010-02-08 13:50:17 +00:00
Alan Modra 5c8a75eb63 update copyright date 2010-02-08 13:47:22 +00:00
Alan Modra b0dddeecc9 * section.c (struct bfd_section): Delete has_tls_reloc,
has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
	Add sec_flg0 thru sec_flg5.
	(BFD_FAKE_SECTION): Update for changed flags.
	* ecoff.c (bfd_debug_section): Likewise.
	* elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
	* elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
	(has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
	* elf32-xtensa.c (reloc_done): Define.
	* elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
	* bfd-in2.h: Regenerate.
2010-02-08 13:16:24 +00:00
Tristan Gingold 06988dfc57 2010-02-08 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
	for non-scattered relocations.
2010-02-08 09:13:47 +00:00
Nathan Sidwell deddc40bec bfd/
* 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-08 07:09:39 +00:00
Alan Modra ce3d2015b2 include/
* opcode/ppc.h (PPC_OPCODE_TITAN): Define.
bfd/
	* archures.c (bfd_mach_ppc_titan): Define.
	* bfd-in2.h: Regenerate.
	* cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
opcodes/
	* ppc-dis.c (ppc_opts): Add titan entry.
	* ppc-opc.c (TITAN, MULHW): Define.
	(powerpc_opcodes): Support AppliedMicro Titan core (APM83xxx).
gas/
	* config/tc-ppc.c (md_show_usage): Mention -mtitan.  Don't use tabs.
	(ppc_mach): Handle titan.
	* doc/c-ppc.texi: Mention -mtitan.
gas/testsuite/
	* gas/ppc/titan.d, * gas/ppc/titan.s: New test.
	* gas/ppc/ppc.exp: Run it.
2010-02-08 01:59:38 +00:00
Alan Modra 06a162cf63 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code. 2010-02-08 00:48:27 +00:00
Alan Modra e94c2ffa76 daily update 2010-02-07 23:00:05 +00:00
Alan Modra 99c6bca0d9 daily update 2010-02-06 23:00:04 +00:00
Alan Modra f6774f398f daily update 2010-02-05 23:00:04 +00:00
Sterling Augustine 4c34844242 Update Changelog entry to include bug number. Checked in as obvious. 2010-02-05 17:42:46 +00:00
Sterling Augustine 1cfb7d1ee1 2010-02-05 Sterling Augustine <sterling@tensilica.com>
* elf.c (assign_file_positions_for_load_sections) Update lma of
	section	if necessary.
2010-02-05 17:08:47 +00:00
H.J. Lu 6bbec50578 Remove trailing white spaces.
2010-02-05  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c: Remove trailing white spaces.
	* elf64-x86-64.c: Likewise.
2010-02-05 14:58:11 +00:00
Alan Modra 9bbe5442ed daily update 2010-02-04 23:00:04 +00:00
Nick Clifton 4dfe6ac6fe * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
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-02-04 09:16:43 +00:00
Alan Modra 23b8708286 daily update 2010-02-03 23:00:04 +00:00
Alan Modra 927be08ec8 bfd/
* elf64-ppc.c (struct plt_entry): Move earlier in file.
	(struct got_entry): Likewise.  Add is_indirect and got.ent fields.
	(struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
	Update all uses.
	(struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
	Remove no_multi_toc.
	(update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
	when allocating a new struct got_entry.
	(allocate_got): New function, extracted from..
	(allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
	(ppc64_elf_size_dynamic_sections): Track got relocs allocated in
	.reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
	(ppc64_elf_setup_section_lists): Remove output_bfd param and
	no_multi_toc, add add_stub_section and layout_sections_again.  Stash
	new params in htab.  Extract some code to..
	(ppc64_elf_start_multitoc_partition): ..here.  New function.
	(ppc64_elf_next_toc_section): Check for linker script errors.  Handle
	second pass toc scan.
	(merge_got_entries, merge_global_got, reallocate_got): New functions.
	(ppc64_elf_reinit_toc): Rename to..
	(ppc64_elf_finish_multitoc_partition): ..this.
	(ppc64_elf_layout_multitoc): New function.
	(ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
	layout_sections_again params.
	(ppc64_elf_relocate_section): Handle indirect got entries.
	* elf64-ppc.h: Update prototypes.  Declare new functions.
ld/
	* emultempl/ppc64elf.em (build_toc_list): Report errors from
	ppc64_elf_next_toc_section.
	(after_allocation): Update for changed function names and params.
	Run second pass of multitoc partitioning.
2010-02-03 12:03:35 +00:00
Alan Modra f0d707f506 daily update 2010-02-02 23:00:04 +00:00
H.J. Lu 4339cae0bb Add NT_386_XSTATE.
bfd/

2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* elf-bfd.h (elfcore_write_xstatereg): New.

	* elf.c (elfcore_grok_xstatereg): New.
	(elfcore_write_xstatereg): Likewise.
	(elfcore_grok_note): Handle NT_X86_XSTATE.
	(elfcore_write_register_note): Handle .reg-xstate section.

binutils/

2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (get_note_type): Handle NT_X86_XSTATE.

include/elf/

2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* common.h (NT_386_XSTATE): New.
2010-02-02 12:37:40 +00:00
Alan Modra 8647208c8e daily update 2010-02-01 23:00:04 +00:00
Tristan Gingold 9848eadf58 2010-02-01 Tristan Gingold <gingold@adacore.com>
* som.c (som_write_ar_hdr): Define this macro.
2010-02-01 13:10:38 +00:00
Alan Modra 5713e87e2d daily update 2010-01-31 23:00:06 +00:00
Alan Modra e57ca9da89 daily update 2010-01-30 23:00:05 +00:00
Dave Anglin f6fd0237f5 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
	linkage table pointer to use the global table pointer if not doing
	a shared link.
2010-01-30 16:09:43 +00:00
Alan Modra 01226412b1 daily update 2010-01-29 23:00:05 +00:00
Joel Brobecker a1504221ad core files: wrong signal number with threaded program on sparc-solaris.
* elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
        if it has already been set.
2010-01-29 04:33:00 +00:00
Alan Modra c7243c60bd daily update 2010-01-28 23:00:04 +00:00
Alan Modra d1e4653e77 daily update 2010-01-27 23:00:05 +00:00
Tristan Gingold 771deb084e 2010-01-27 Tristan Gingold <gingold@adacore.com>
* vms.h: Remove trailing spaces.
	(struct hdr_struct): Remove unused hdr_c_cpr field.
	(enum file_format_enum): Add comments.
	* vms.c (vms_bfd_print_private_bfd_data): New function that
	replaces the macro.
	Remove trailing spaces.
	* vms-misc.c: Improve comments.
	(_bfd_vms_get_object_record): Also handle files without pads.
	* vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
	* vms-gsd.c (struct flagdescstruct): Make name field const.
	(gsyflagdesc): Fix typo.
2010-01-27 16:43:27 +00:00
Alan Modra bf102f86b1 PR ld/11217
* elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
	(ppc64_elf_setup_section_lists): Init them.
	(ppc64_elf_next_toc_section): Don't partition multi-toc between .got
	and .toc on the same input file.
	(ppc64_elf_relocate_section): Correct GOT entry offset.
2010-01-27 12:44:07 +00:00
Alan Modra c57a9d51fc daily update 2010-01-26 23:00:05 +00:00
Tristan Gingold 8f95b6e449 2010-01-26 Tristan Gingold <gingold@adacore.com>
* targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
	(bfd_target): Add _bfd_write_ar_hdr_fn field.
	* archive.c (is_bsd44_extended_name): New macro.
	(_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
	(bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
	name.
	(_bfd_archive_bsd44_construct_extended_name_table): New function.
	(_bfd_generic_write_ar_hdr): Ditto.
	(_bfd_bsd44_write_ar_hdr): Ditto.
	(_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
	(bsd_write_armap): Adjust firstreal computation.
	* libbfd-in.h (struct areltdata): Add extra_size field.
	(_bfd_generic_write_ar_hdr): Add prototype.
	(_bfd_bsd44_write_ar_hdr): Ditto.
	(_bfd_write_ar_hdr): Define.
	(_bfd_noarchive_write_ar_hdr): Ditto.
	(_bfd_archive_bsd_write_ar_hdr): Ditto.
	(_bfd_archive_coff_write_ar_hdr): Ditto.
	(_bfd_archive_bsd44_slurp_armap): Ditto.
	(_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
	(_bfd_archive_bsd44_construct_extended_name_table): New prototype.
	(_bfd_archive_bsd44_truncate_arname): Ditto.
	(_bfd_archive_bsd44_write_armap): Ditto.
	(_bfd_archive_bsd44_read_ar_hdr): Ditto.
	(_bfd_archive_bsd44_write_ar_hdr): Ditto.
	(_bfd_archive_bsd44_openr_next_archived_file): Ditto.
	(_bfd_archive_bsd44_get_elt_at_index): Ditto.
	(_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
	(_bfd_archive_bsd44_update_armap_timestamp): Ditto.
	* libbfd.h: Regenerate.
	* oasys.c (oasys_write_ar_hdr): Define.
	* libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
	* ieee.c (ieee_write_ar_hdr): Define.
	* elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
	* coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
	(bfd_pmac_xcoff_backend_data): Ditto.
	* coff64-rs6000.c (rs6000coff64_vec): Ditto.
	(bfd_xcoff_aix5_backend_data): Ditto.
	* coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
	* aout-target.h (MY_write_ar_hdr): Define it if not defined.
	* aout-tic30.c (MY_write_ar_hdr): Ditto.
	* mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
	(bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
	(bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
	(bfd_mach_o_construct_extended_name_table)
	(bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
	(bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
	(bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
	* mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
	(bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
	(bfd_mach_o_construct_extended_name_table)
	(bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
	(bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
	(bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
	* bfd-in2.h: Regenerate.
2010-01-26 13:42:26 +00:00
H.J. Lu 98da7939e1 Properly check undefined symbols when gc_sections is active.
bfd/

2010-01-26  Alan Modra  <amodra@gmail.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11218
	* elflink.c (elf_link_output_extsym): Do not ignore undefined
	symbols with ref_regular set when gc_sections is active.

ld/testsuite/

2010-01-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11218
	* ld-gc/dummy.s: New.
	* ld-gc/pr11218-1.c: Likewise.
	* ld-gc/pr11218-2.c: Likewise.
	* ld-gc/pr11218.d: Likewise.
2010-01-26 13:21:36 +00:00
Alan Modra 643afa3243 daily update 2010-01-25 23:00:05 +00:00
Alan Modra 766bc6567a PR ld/11217
* elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
	with relocations against undefined weak symbols.
	(ppc64_elf_relocate_section): Don't optimize calls to undefined
	weak functions if the symbol is dynamic.
	(ppc64_elf_relocate_section): Edit tprel tls sequences.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	(_bfd_elf_ppc_at_tprel_transform): New function.
	* bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
	* bfd-in2.h: Regenerate.
2010-01-25 06:47:16 +00:00
Alan Modra 483b3bf6f6 daily update 2010-01-24 23:00:05 +00:00
Alan Modra 991fa3fdbb daily update 2010-01-23 23:00:05 +00:00
Richard Sandiford c865e45b1b bfd/
* coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
	(_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
	* coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
	bitsize to 1.
	(xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.

gas/
	* write.h (fix_at_start): Declare.
	* write.c (fix_new_internal): Add at_beginning parameter.
	Use it instead of REVERSE_SORT_RELOCS.  Fix the handling of
	seg_fix_tailP for the at_beginning/REVERSE_SORT_RELOCS case.
	(fix_new, fix_new_exp): Update accordingly.
	(fix_at_start): New function.
	* config/tc-ppc.c (md_pseudo_table): Add .ref to the OBJ_XCOFF section.
	(ppc_ref): New function, for OBJ_XCOFF.
	(md_apply_fix): Handle BFD_RELOC_NONE for OBJ_XCOFF.
	* config/te-i386aix.h (REVERSE_SORT_RELOCS): Remove #undef.

gas/testsuite/
	* gas/ppc/xcoff-ref-1.s, gas/ppc/xcoff-ref-1.l: New test.
	* gas/ppc/aix.exp: Run it.


ld/testsuite/
	* ld-powerpc/aix-ref-1-32.od, ld-powerpc/aix-ref-1-64.od,
	ld-powerpc/aix-ref-1.s: New tests.
	* ld-powerpc/aix52.exp: Run them.
2010-01-23 12:05:33 +00:00
Alan Modra e4cceb006b daily update 2010-01-22 23:00:04 +00:00
Alan Modra 82a0133619 daily update 2010-01-21 23:00:05 +00:00
Nick Clifton b918acf91a * elflink.c (elf_link_add_object_symbols): Look up name of
undefined symbol both before and after versioning has been
        applied.  Do not bother with symbols that are weakly undefined.
2010-01-21 14:54:40 +00:00
Andreas Krebbel 55786da2bf 2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* readelf.c (get_machine_flags): Handle EF_S390_HIGH_GPRS.

2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* s390.h (EF_S390_HIGH_GPRS): Added macro definition.

2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/tc-s390.c (s390_elf_final_processing): New function.
	* config/tc-s390.h (elf_tc_final_processing): New macro definition.
	(s390_elf_final_processing): Added prototype.

2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
	(bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
2010-01-21 11:40:28 +00:00
Alan Modra fefe4dc97c daily update 2010-01-20 23:00:05 +00:00
Cary Coutant a37a68dd3c * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8. 2010-01-19 23:17:57 +00:00
Alan Modra 2952bad40b daily update 2010-01-19 23:00:04 +00:00
Alan Modra ecd12bc14d * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
(elf_object_p): Read e_phnum extension.
	(elf_write_shdrs_and_ehdr): Write e_phnum extension.
        * elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
	that we can read last program header.
2010-01-19 13:50:55 +00:00
Alan Modra f6ebfac085 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
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.
2010-01-19 03:49:43 +00:00
Alan Modra 77aa0c9ad6 daily update 2010-01-18 23:00:05 +00:00
Alan Modra 22eb4b1d8d PR 11168
* coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
	block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
	than 32k sections.
2010-01-18 07:21:46 +00:00
Alan Modra 7dbc8cf618 daily update 2010-01-17 23:00:05 +00:00
Alan Modra aecf9ed10d daily update 2010-01-16 23:00:05 +00:00
Alan Modra aa41e068c5 daily update 2010-01-15 23:00:05 +00:00
Jan Kratochvil 6ec12636a7 bfd/
Fix compilation warning on gcc-3.4.
	* vms-tir.c (start_etir_record, sto_imm): Rename the prototype
	parameter index to sec_index according to the function definition.
2010-01-15 21:38:16 +00:00
Alan Modra a2bc0f34f2 daily update 2010-01-14 23:00:05 +00:00
Alan Modra 9880037ce4 daily update 2010-01-13 23:00:04 +00:00
Chao-ying Fu 38a7df635c 2010-01-13 Chao-ying Fu <fu@mips.com>
* elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
	It is true for all CPUs.
	(jal_reloc_p): New function.
	(mips_elf_calculate_relocation): Rename require_jalxp to
	cross_mode_jump_p.
	Update comment for CROSS_MODE_JUMP_P.
	Set up cross_mode_jump_p based on the mode change.
	(mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
	Update comment for CROSS_MODE_JUMP_P.
	Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
	Use !cross_mode_jump_p to guard conversion.
	Convert "jr t9" to "b", if possible.
	(_bfd_mips_elf_relocate_section): Rename require_jalx to
	cross_mode_jump_p.
	Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
	Pass cross_mode_jump_p to call mips_elf_perform_relocation.
2010-01-13 22:30:53 +00:00
Nick Clifton 91b9a4a49b * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
"m32c" returns the m32c arch_info_struct and not the m16c
        arch_info_struct.
        (arch_info_struct): Use the new scan function.
        (bfd_m32c_arch): Likewise.
2010-01-13 14:34:13 +00:00
Tristan Gingold 618b730147 2010-01-13 Tristan Gingold <gingold@adacore.com>
* config.bfd: Remove duplicated target vector for i386-*-darwin.
	Appends new arch instead of overriding.
	Use mach_o_x86_64_vec for x86_64-*-darwin.
	* configure.in: Add mach_o_x86_64_vec.
	* configure: Regenerate.
	* targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
	* Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
	(BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
	* Makefile.in: Regenerate.
	* mach-o-x86-64.c: New file.
2010-01-13 11:49:36 +00:00
Tristan Gingold f88af2f152 2010-01-13 Tristan Gingold <gingold@adacore.com>
* reloc.c: Add MACH_O_X86_64 relocations.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2010-01-13 11:35:19 +00:00
Tristan Gingold 19172f3923 2010-01-13 Tristan Gingold <gingold@adacore.com>
* archive.c (normalize): Use lbasename.
	(bfd_bsd_truncate_arname): Ditto.
	(bfd_gnu_truncate_arname): Ditto.
2010-01-13 08:48:26 +00:00
Alan Modra d42e22fa80 daily update 2010-01-12 23:00:04 +00:00
Tristan Gingold 6cdb8d8291 bfd/
2010-01-12  Tristan Gingold  <gingold@adacore.com>

	* makefile.vms (CFLAGS): Turns warnings into informational messages.

binutils/
2010-01-12  Tristan Gingold  <gingold@adacore.com>

	* makefile.vms (CFLAGS): Turns warnings into informational messages.
2010-01-12 10:16:50 +00:00
Alan Modra 25a18dca48 daily update 2010-01-11 23:00:05 +00:00
Tristan Gingold 9a753de0ad 2010-01-11 Tristan Gingold <gingold@adacore.com>
* mach-o.h: Add x86-64 relocation types.
2010-01-11 15:57:59 +00:00
Tristan Gingold 42fa08916b 2010-01-11 Tristan Gingold <gingold@adacore.com>
* mach-o.h (bfd_mach_o_backend_data): Add arch field.
	(bfd_mach_o_set_arch_mach): New prototype.
	* mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
	(bfd_mach_o_set_arch_mach): New function.
	(bfd_mach_o_gen_mkobject): New function.
	Set TARGET_ARCHITECTURE for the generic back-ends.
	* mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
	Check that TARGET_ARCHITECTURE is defined.
	Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
	* mach-o-i386.c (TARGET_ARCHITECTURE): Define.
2010-01-11 15:39:41 +00:00
Tristan Gingold cba0723b0f 2010-01-11 Tristan Gingold <gingold@adacore.com>
* archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
2010-01-11 15:29:36 +00:00
Nick Clifton 4d421096e0 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
handling of R_V850_HI16_S relocation.
2010-01-11 14:19:40 +00:00
Alan Modra 20b1d3e390 PR 11103
* dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
2010-01-11 09:53:27 +00:00
Alan Modra 94df17f2c8 update copyright date 2010-01-11 09:43:08 +00:00
Alan Modra a358ecb8a8 PR 6832
* dwarf2.c (struct comp_unit): Add sec_info_ptr.
	(find_abstract_instance_name): Use it.
	(parse_comp_unit): Set it.
2010-01-11 08:36:19 +00:00
Alan Modra 1181fbf413 daily update 2010-01-10 23:00:04 +00:00
Alan Modra fca4b0aa55 daily update 2010-01-09 23:00:04 +00:00
Ralf Wildenhues 3725885a65 Sync Libtool from GCC.
/:
	* libtool.m4: Sync from git Libtool.
	* ltmain.sh: Likewise.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/:
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.
	* microblaze/configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.

gprof/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

opcodes/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gas/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

ld/:
	* configure: Regenerate.

gdb/testsuite/:
	* gdb.cell/configure: Regenerate.

binutils/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

bfd/doc/:
	* Makefile.in: Regenerate.
2010-01-09 21:11:44 +00:00
Alan Modra ee882def94 daily update 2010-01-08 23:00:05 +00:00
Tristan Gingold 3ee87829b9 2010-01-08 Tristan Gingold <gingold@adacore.com>
* archive.c: Remove bfd_special_undocumented_glue.
2010-01-08 11:15:39 +00:00
Alan Modra fb34365b48 PR ld/11133
* elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
	* elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
	* elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
2010-01-08 05:55:10 +00:00
H.J. Lu d023c380db Fix PR ld/11138
bfd/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11138
	* elflink.c (elf_link_check_versioned_symbol): Don't abort if
	a symbol referenced by DSO is is defined in a non-shared object
	and forced local.

ld/testsuite/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11138
	* ld-elf/pr11138-1.c: New.
	* ld-elf/pr11138-1.map: Likewise.
	* ld-elf/pr11138-2.c: Likewise.
	* ld-elf/pr11138-2.map: Likewise.
	* ld-elf/pr11138.out: Likewise.

	* ld-elf/shared.exp (build_tests): Add libpr11138-1.so and
	libpr11138-2.o.
	(run_tests): Add 2 tests for PR ld/11138.
2010-01-08 03:03:16 +00:00
H.J. Lu bde6f3eb6d Set SEC_KEEP on section XXX for undefined __start_XXX/__stop_XXX
bfd/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11133
	* elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
	undefined __start_XXX/__stop_XXX in all input files and set
	SEC_KEEP.

ld/testsuite/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11133
	* ld-gc/gc.exp: Run start.

	* ld-gc/start.d: New.
	* ld-gc/start.s: Likewise.
2010-01-08 01:43:23 +00:00
Alan Modra bf694f4a09 daily update 2010-01-07 23:00:05 +00:00
H.J. Lu 16583161e1 Always keep SHT_NOTE sections
bfd/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11143
	* elflink.c (elf_gc_sweep): Keep SHT_NOTE section.

ld/testsuite/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11143
	* ld-gc/gc.exp: Run abi-note.

	* ld-gc/abi-note.d: New.
	* ld-gc/abi-note.s: Likewise.
2010-01-07 13:44:37 +00:00
Alan Modra 0d2a7b854e daily update 2010-01-06 23:00:04 +00:00
Alan Modra 6bb39dc973 daily update 2010-01-05 23:00:05 +00:00
Daniel Gutson 16231b7b9d 2010-01-04 Daniel Gutson <dgutson@codesourcery.com>
* bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
        before including procfs.h.
        (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
        * configure.in: Added autoconf probe for the pr_fpreg member.
        * configure: Regenerated.
        * config.in: Regenerated.
        * elf.c: Define _STRUCTURE_PROC before including procfs.h.
2010-01-05 00:40:07 +00:00
Alan Modra 878c79795e daily update 2010-01-04 23:00:47 +00:00
Joel Brobecker 608fa8d35d Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
* dwarf2.c (concat_filename): Rename dirname with dir_name
        to void shadowing the dirname function.
        Rename subdirname with subdir_name to stay consistent with
        the new dir_name variable name.
2010-01-04 11:44:30 +00:00
Alan Modra 0dc9305793 bfd/
* archures.c: Add bfd_mach_ppc_e500mc64.
	* bfd-in2.h: Regenerate.
	* cpu-powerpc.c (bfd_powerpc_archs): Add entry for
	bfd_mach_ppc_e500mc64.
gas/
	* config/tc-ppc.c (md_show_usage): Document -me500mc64.
opcodes/
	* ppc-dis.c (ppc_opts): Add entry for "e500mc64".
2010-01-04 02:32:56 +00:00
Alan Modra e2f68deb23 daily update 2010-01-03 23:00:46 +00:00
Alan Modra abdb4ee280 daily update 2010-01-02 23:00:40 +00:00
Alan Modra 9caa6a852f daily update 2010-01-01 23:00:35 +00:00
H.J. Lu 43ecc30f09 Move 2009 binutils ChangeLog to ChangeLog-2009. 2010-01-01 18:06:10 +00:00
Joel Brobecker baf9bed325 Fix -Wshadow warnings (seen on ppc-aix)
* xcofflink.c: Replace finfo by flinfo throughout.
2010-01-01 13:42:26 +00:00
Alan Modra 1ff51a0af0 daily update 2009-12-31 23:00:32 +00:00
Nick Clifton 0ee19663b7 * dwarf2.c (struct line_sequence): New struct.
(struct line_info_table): Add num_sequences, remove last_line,
        add sequences.
        (add_line_info): Add new sequences as necessary.
        (compare_sequences): New function.
        (sort_line_sequences): New function.
        (decode_line_info): Initialize new fields in line table.
        Call sort_line_sequences.
        (lookup_address_in_line_info_table): Binary search for proper
        sequence.
2009-12-31 14:10:29 +00:00
Alan Modra 33242c8f4c daily update 2009-12-30 23:00:28 +00:00
Alan Modra b1c2b04fde daily update 2009-12-29 23:00:25 +00:00
Alan Modra ae77ee9a7f daily update 2009-12-28 23:00:21 +00:00
Daniel Gutson 4e67d4ca2a bfd/
* 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-28 18:55:16 +00:00