Commit Graph

8873 Commits

Author SHA1 Message Date
Richard Sandiford cbc704f397 bfd/
* elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
	(elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
	into the PLT block.

ld/
	* emultempl/armelf.em (arm_elf_before_allocation): Check dynobj
	instead of dynamic_sections_created.
2011-03-14 15:53:58 +00:00
Richard Sandiford f6e32f6db5 bfd/
* elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
	may_need_local_target_p and may_become_dynamic_p to classify
	the relocation type.  Don't check info->symbolic or h->def_regular
	when deciding whether to record a potential dynamic reloc.
	Don't treat potential dynamic relocs as PLT references.
	(elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
	try to make the PLT reference count go negative.

ld/testsuite/
	* ld-arm/arm-lib-plt-2a.s, ld-arm/arm-lib-plt-2b.s,
	ld-arm/arm-lib-plt-2.dd, ld-arm/arm-lib-plt-2.rd: New tests.
	* ld-arm/arm-elf.exp: Run them.
2011-03-14 15:53:33 +00:00
Richard Sandiford b436d85411 bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
	GOT entry here, rather than leaving it to finish_dynamic_symbol.
	Only create a dynamic relocation for local references if
	info->shared.
	(allocate_dynrelocs_for_symbol): Update dynamic relocation
	allocation accordingly.
	(elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.

ld/testsuite/
	* ld-arm/exec-got-1a.s, ld-arm/exec-got-1b.s, ld-arm/exec-got-1.d,
	ld-arm/unresolved-1.s, ld-arm/unresolved-1.d,
	ld-arm/unresolved-1-dyn.d: New tests.
	* ld-arm/arm-elf.exp: Run them.
2011-03-14 15:52:53 +00:00
Richard Sandiford 47beaa6a21 bfd/
* elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
	(elf32_arm_add_dynreloc): Likewise.
	(elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
	to allocate dynamic relocations.
	(elf32_arm_size_dynamic_sections): Likewise.
	(allocate_dynrelocs): Likewise.  Rename to
	allocate_dynrelocs_for_symbol.
	(elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
	create dynamic relocations.
	(elf32_arm_finish_dynamic_symbol): Likewise.
2011-03-14 15:52:05 +00:00
Alan Modra f243130fcc daily update 2011-03-13 23:00:05 +00:00
Alan Modra 1c95c79c81 daily update 2011-03-12 23:00:05 +00:00
H.J. Lu 52bc799a91 Support TLS x32 GD->IE, GD->LE and LD->LE transitions.
bfd/

2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
	x32 GD->IE and GD->LE transitions.
	(elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
	and LD->LE transitions.

ld/testsuite/

2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/tlsgd4.dd: New.
	* ld-x86-64/tlsgd4.s: Likewise.
	* ld-x86-64/tlsgd5.dd: Likewise.
	* ld-x86-64/tlsgd5a.s: Likewise.
	* ld-x86-64/tlsgd5b.s: Likewise.
	* ld-x86-64/tlsgd6.dd: Likewise.
	* ld-x86-64/tlsgd6a.s: Likewise.
	* ld-x86-64/tlsgd6b.s: Likewise.
	* ld-x86-64/tlsld2.dd: Likewise.
	* ld-x86-64/tlsld2.s: Likewise.

	* ld-x86-64/x86-64.exp (x86_64tests): Add tlsgd4, libtlsgd5.so,
	tlsgd5, libtlsgd6.so, tlsgd6 and tlsld2.
2011-03-12 14:38:31 +00:00
Alan Modra 4aa7161376 daily update 2011-03-11 23:00:05 +00:00
Alan Modra 0777b18b9d daily update 2011-03-10 23:00:05 +00:00
Alan Modra e11840f950 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
for LO_DS error message and correct multiple.
2011-03-10 09:26:18 +00:00
Alan Modra aa374f67f7 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
(ppc64_elf_link_just_syms): New function.
	(opd_entry_value): Don't assume big-endian host.
	(get_r2off): New function.
	(ppc_build_one_stub, ppc_size_one_stub): Use it here.
2011-03-10 09:11:15 +00:00
Alan Modra 8f83209955 daily update 2011-03-09 23:00:05 +00:00
Alan Modra ca728e5128 daily update 2011-03-08 23:00:06 +00:00
Alan Modra 7382000ffe daily update 2011-03-07 23:00:05 +00:00
Alan Modra 44d77c0ea0 daily update 2011-03-06 23:00:05 +00:00
Michael Snyder 4281caadcf 2011-03-05 Michael Snyder <msnyder@vmware.com>
* compress.c (bfd_compress_section_contents): Check for out of mem.
2011-03-06 18:37:07 +00:00
Michael Snyder 176720017d 2011-03-06 Michael Snyder <msnyder@vmware.com>
* elf64-x86-64.c (elf_x86_64_relocate_section): Document
	that case statement falls through intentionally.
2011-03-06 18:27:03 +00:00
Michael Snyder d59a60e937 2011-03-06 Michael Snyder <msnyder@vmware.com>
* elf32-i386.c (elf_i386_relocate_section): Document fall through.
2011-03-06 18:22:36 +00:00
Alan Modra 4b162076e8 daily update 2011-03-05 23:00:06 +00:00
Alan Modra 51dc551dc2 daily update 2011-03-04 23:00:17 +00:00
Alan Modra 0e29e6e859 * archive.c (bsd_write_armap): Don't call stat in deterministic
mode, and don't use st_mtime if stat returns error.
2011-03-04 01:43:24 +00:00
Michael Snyder 08c135952e 2011-03-03 Michael Snyder <msnyder@vmware.com>
* elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
2011-03-04 00:38:29 +00:00
Michael Snyder d543c50d66 2011-03-03 Michael Snyder <msnyder@vmware.com>
* coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
2011-03-03 23:49:21 +00:00
Michael Snyder c38eb2a67d 2011-03-03 Michael Snyder <msnyder@vmware.com>
* aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
	(aout_link_write_other_symbol): Missing break statement.
2011-03-03 23:47:21 +00:00
Michael Snyder 8ecc1f2027 2011-03-03 Michael Snyder <msnyder@vmware.com>
* dwarf2.c (scan_unit_for_symbols): Stop memory leak.
2011-03-03 23:43:08 +00:00
Michael Snyder eb00922a32 2011-03-03 Michael Snyder <msnyder@vmware.com>
* archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
2011-03-03 23:41:21 +00:00
Alan Modra b4aa9232b7 daily update 2011-03-03 23:00:05 +00:00
H.J. Lu 4a4c5f250b Supprt TLS x32 IE->LE transition.
bfd/

2011-03-03  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
	x32 IE->LE transition.
	(elf_x86_64_relocate_section): Likewise.

ld/testsuite/

2011-03-03  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/tlsie4.dd: New.
	* ld-x86-64/tlsie4.s: Likewise.

	* ld-x86-64/x86-64.exp (x86_64tests): Add tlsie4.
2011-03-03 22:11:33 +00:00
Alan Modra f635986e73 daily update 2011-03-02 23:00:07 +00:00
Bernd Schmidt ddcf1fcfb2 * elflink.c (is_reloc_section): Remove function.
(get_dynamic_reloc_section_name): Construct string manually.
2011-03-02 17:07:03 +00:00
Alan Modra 75c362b84e daily update 2011-03-01 23:00:06 +00:00
Alan Modra ff1431da42 daily update 2011-02-28 23:00:05 +00:00
Kai Tietz 007d618909 ChangeLog libiberty/
2011-02-28  Kai Tietz  <kai.tietz@onevision.com>

	* filename_cmp.c (filename_ncmp): New function.
	* functions.texi: Regenerated.

ChangeLog include/
2011-02-28  Kai Tietz  <kai.tietz@onevision.com>

	* filenames.h (filename_ncmp): New prototype.

ChangeLog bfd/
2011-02-28  Kai Tietz  <kai.tietz@onevision.com>

	* archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
	(adjust_relative_path): Likewise.
	(_bfd_construct_extended_name_table): Likewise.
	* corefile.c (generic_core_file_matches_executable_p): Likewise.
	* elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-spu.c (sort_bfds): Likewise.
	(spu_elf_auto_overlay): Likewise.
	* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
	* xcofflink.c (xcoff_set_import_path): Likewise.
	* xtensa-isa.c (xtensa_regfile_lookup): Likewise.
	(xtensa_regfile_lookup_shortname): Likewise.
2011-02-28 18:30:16 +00:00
Alan Modra 8616ad89d6 PR 12513
* archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
	stringsize.  Properly sanity check symdef_count.  Remove redundant
	bfd_release.
2011-02-28 07:46:37 +00:00
Alan Modra 9a7d3aa9ac daily update 2011-02-27 23:00:05 +00:00
Alan Modra c24bea2f47 daily update 2011-02-26 23:00:05 +00:00
Rafael Ávila de Espíndola 80549d04a2 2011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
* plugin.c (bfd_plugin_object_p): Correctly set the filesize
	and handle claim_file seeking. Only try to load the plugin once.
2011-02-26 00:03:09 +00:00
Alan Modra 6c597b9d36 daily update 2011-02-25 23:00:06 +00:00
Alan Modra 53ed733c44 daily update 2011-02-24 23:00:05 +00:00
Alan Modra d1e12d09f3 daily update 2011-02-23 23:00:06 +00:00
Alan Modra ceb839f35d daily update 2011-02-22 23:00:06 +00:00
Andreas Schwab 93b3ac7505 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
relocation read the value from the second GOT slot.
2011-02-22 15:46:13 +00:00
Alan Modra 8ecaf248f5 daily update 2011-02-21 23:00:05 +00:00
Alan Modra 748d7a86a6 daily update 2011-02-20 23:00:06 +00:00
Alan Modra b6c5772a6d daily update 2011-02-19 23:00:06 +00:00
Alan Modra 96012e554a daily update 2011-02-18 23:00:06 +00:00
Alan Modra 33df58f5be daily update 2011-02-17 23:00:05 +00:00
H.J. Lu 98e16b7718 Revert the last change to elf64-x86-64.c. 2011-02-17 13:51:52 +00:00
Alan Modra 567c08759e daily update 2011-02-16 23:00:04 +00:00
H.J. Lu 5295881de1 Don't check relocation overflow for x32.
2011-02-16  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf_x86_64_check_relocs): Check relocation
	overflow only for ABI_64_P.
	(elf_x86_64_relocate_section): Likewise.
2011-02-16 14:58:18 +00:00