Commit Graph

9310 Commits

Author SHA1 Message Date
Alan Modra f33e68fc7e daily update 2011-10-18 23:00:06 +00:00
Alan Modra 42dd20afd3 daily update 2011-10-17 23:00:06 +00:00
Alan Modra 4c58e0d815 PR ld/12975
PR ld/13195
	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Apply 2011-09-15
	and 2011-09-29 bfd_elf_gc_mark_dynamic_ref_symbol changes here too.
2011-10-17 08:27:45 +00:00
Alan Modra 4edf0e1349 daily update 2011-10-16 23:00:06 +00:00
Alan Modra 79124878b7 daily update 2011-10-15 23:00:05 +00:00
Alan Modra 96c5c4887c daily update 2011-10-14 23:00:05 +00:00
Hans-Peter Nilsson 970d488d05 * elf32-cris.c (cris_elf_gc_sweep_hook) <R_CRIS_16_GOTPLT>
<R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
	global symbols.
	<R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
	updates of the plt refcount.
	(elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
	refcount in relation to the plt refcount.
2011-10-14 06:52:46 +00:00
Alan Modra a4b3198b37 daily update 2011-10-13 23:00:09 +00:00
Nick Clifton 9cd3e4e527 * elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
stubs as resolved.
2011-10-13 09:47:51 +00:00
Alan Modra 55809515b1 daily update 2011-10-12 23:00:05 +00:00
Alan Modra 4391ee7045 daily update 2011-10-11 23:00:05 +00:00
Alan Modra b228303dd1 PR binutils/13278
* archive.c (bfd_generic_archive_p): Only check first element
	when target_defaulted.
	(_bfd_construct_extended_name_table): Use ar_maxnamelen.
	(_bfd_archive_bsd44_construct_extended_name_table): Likewise.
2011-10-11 06:44:13 +00:00
Alan Modra 98c53ba306 PR binutils/13257
* archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
	thin archive element using container target if not defaulted.
2011-10-11 06:30:20 +00:00
Alan Modra db8c06a516 daily update 2011-10-10 23:00:05 +00:00
Nick Clifton d569865703 Updated Bulgarian, Spanish, Finnish, French, Russian and Ukranian translations. 2011-10-10 16:12:24 +00:00
Alan Modra 3b421ab3bc include/elf/
* ppc64.h (R_PPC64_TOCSAVE): Add.
bfd/
	* elf64-ppc.c (ppc64_elf_howto_table): Add R_PPC64_TOCSAVE entry.
	(struct ppc_link_hash_table): Add tocsave_htab.
	(struct tocsave_entry): New.
	(tocsave_htab_hash, tocsave_htab_eq, tocsave_find): New functions.
	(ppc64_elf_link_hash_table_create): Create tocsave_htab..
	(ppc64_elf_link_hash_table_free): ..and delete it.
	(build_plt_stub): Always put STD_R2_40R1 first.
	(ppc64_elf_size_stubs): Check for R_PPC64_TOCSAVE following reloc
	on plt call.  If present add prologue nop location to tocsave_htab.
	(ppc64_elf_relocate_section): Convert prologue nop to std.  Skip
	first insn of plt call stub when R_PPC64_TOCSAVE present.
2011-10-10 13:21:07 +00:00
Alan Modra 8ab1a5dc75 daily update 2011-10-09 23:00:05 +00:00
Alan Modra dd24f69fd7 daily update 2011-10-08 23:00:05 +00:00
H.J. Lu 3e0882af52 Preserve the maximum alignment/size for common symbols.
bfd/

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

	PR ld/13250
	* elflink.c (elf_link_add_object_symbols): Preserve the maximum
	alignment and size for common symbols.

ld/testsuite/

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

	PR ld/13250
	* ld-elf/shared.exp (build_tests): Add tests for PR ld/13250.
	(run_tests): Likewise.

	* ld-elf/pr13250-1.c: New.
	* ld-elf/pr13250-2.c: Likewise.
	* ld-elf/pr13250-3.c: Likewise.
2011-10-08 16:51:11 +00:00
Alan Modra c3df8c1482 PR ld/13229
PR ld/13244
	* elflink.c (elf_link_add_object_symbols): Don't make IR symbols
	dynamic.
2011-10-08 07:50:19 +00:00
Alan Modra d56d55e7af * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
even when strip_discarded is false.
2011-10-07 23:06:09 +00:00
Alan Modra 1d5548f8de daily update 2011-10-07 23:00:04 +00:00
Alan Modra 0bae565730 daily update 2011-10-06 23:00:06 +00:00
Kai Tietz 07c7ed6d77 * coffgen.c (coff_write_alien_symbol): Don't write
symbol for discarded sections, if strip_discarded isn't
        explicit set to false.
        (coff_write_native_symbol): Likewise.
2011-10-06 08:59:36 +00:00
Alan Modra 4a4ddfe9f5 daily update 2011-10-05 23:00:06 +00:00
H.J. Lu d14552abec Add missing ChangeLog entries. 2011-10-05 16:37:50 +00:00
Nick Clifton d4cb0ea0ca * readelf.c (get_machine_dlags): Add support for RX's PID mode.
* ld-scripts/phdrs.exp: Expect to fail for the RX.

	* elf32-rx.c: Add support for PID mode.
	(rx_elf_relocate_section): Add checks for unsafe PID relocations.
	Include addend in R_RX_SYM relocations.

	* config/rx-defs.h (rx_pid_register): New.
	(rx_gp_register): New.
	* config/rx-parse.y (rx_lex): Add support for %gpreg and %pidreg.
	(displacement): Add PID support.
	* config/tc-rx.c (rx_pid_mode): New.
	(rx_num_int_regs): New.
	(rx_pid_register): New.
	(rx_gp_register): New.
	(options): Add -mpid and -mint-register= options.
	(md_longopts): Likewise.
	(md_parse_option): Likewise.
	(md_show_usage): Likewise.
	(rx_pid_symbol): New.
	(rx_pidreg_symbol): New.
	(rx_gpreg_symbol): New.
	(md_begin): Support PID.
	(rx_validate_fix_sub): Support PID.
	(tc_gen_reloc): Support PID.
	* doc/c-rx.texi: Document PID support.

	* rx.h (E_FLAG_RX_PID): New.
2011-10-05 14:13:31 +00:00
Alan Modra 6ba007a313 daily update 2011-10-04 23:00:05 +00:00
Alan Modra c98ab4592c daily update 2011-10-03 23:00:06 +00:00
Alan Modra 6f9250130e daily update 2011-10-02 23:00:06 +00:00
Alan Modra 7bc5d59cea daily update 2011-10-01 23:00:05 +00:00
Alan Modra aadd11af48 daily update 2011-10-01 00:00:05 +00:00
Tristan Gingold fc28f9aa23 2011-09-30 Tristan Gingold <gingold@adacore.com>
* dwarf2.c (struct dwarf2_debug): Add field debug_sections.
	(read_section): Add sec argument. Adjust the code to get section
	names from it.
	(read_indirect_string): Adjust call to read_section.
	(read_abbrevs): Ditto.
	(decode_line_info): Ditto.
	(read_debug_ranges): Ditto.
	(DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
	(find_debug_info): Add debug_sections parameter.  Use it instead
	the above macros.
	(place_sections): Get section names from stash.
	(find_line): Add debug_sections argument.  Initialize
	debug_sections field of stash from it.
	Adjust calls to find_debug_info.
	(_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
	Adjust call to find_line.
	(_bfd_dwarf2_find_line): Adjust call to find_line.
	* libcoff-in.h (struct dwarf_debug_section): New declaration.
	(coff_find_nearest_line_with_names): Likewise.
	* libcoff.h: Regenerate.
	* libbfd-in.h (struct dwarf_debug_section): Move declaration.
	(dwarf_debug_sections): Likewise.
	(_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
	* libbfd.h: Regenerate.
	* elf.c (_bfd_elf_find_nearest_line): Adjust call to
	_bfd_dwarf2_find_nearest_line.
	* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
	* elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
	* elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
	* coffgen.c (coff_find_nearest_line_with_names): New function.
	(coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
	* coff-rs6000.c (xcoff_debug_sections): New constant.
	(xcoff_find_nearest_line): New function.
	(rs6000coff_vec): Use xcoff_find_nearest_line.
	(pmac_xcoff_vec): Ditto.
2011-09-30 10:39:45 +00:00
Alan Modra 9852805258 PR ld/13235
bfd/
	* elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
	(ppc64_elf_edit_toc): Check HA relocs.
	(ha_reloc_match): Delete function.
	(ppc64_elf_relocate_section): Remove delayed HA nop optimization.
	Instead do it and low part optimization based on
	ha_relocs_not_using_r2.
ld/testsuite/
	* ld-powerpc/tocopt.d: Update.
	* ld-powerpc/tocopt5.d, * ld-powerpc/tocopt5.s: New test.
	* ld-powerpc/powerpc.exp: Run new test.
2011-09-30 05:11:04 +00:00
Alan Modra dd0c24e3bd daily update 2011-09-30 00:00:05 +00:00
Alan Modra c227efa6d5 PR ld/13233
* elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
	debug and special section groups.
2011-09-29 05:40:21 +00:00
H.J. Lu 54e8959c60 Fix --gc-sections failure with symbol versioning.
bfd/

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

	PR ld/13195
	* elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when
	clearing def_dynamic.
	(elf_link_add_object_symbols): Likewise.  Set dynamic_def when
	setting def_dynamic.
	(bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is
	versioned.

ld/testsuite/

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

	PR ld/13195
	* ld-elf/elf.exp: Add a C link testcase for PR ld/13195.

	* ld-elf/pr13195.c: New.
	* ld-elf/pr13195.d: Likewise.
	* ld-elf/pr13195.s: Likewise.
	* ld-elf/pr13195.t: Likewise.
2011-09-29 00:13:14 +00:00
Alan Modra 9277183184 daily update 2011-09-29 00:00:05 +00:00
Alan Modra 9d5b7ddc71 daily update 2011-09-28 00:00:05 +00:00
Kai Tietz 2b914c2b41 * coffcode.h (sec_to_styp_flags): Handle
SEC_LINK_DUPLICATES_SAME_CONTENTS, and
	SEC_LINK_DUPLICATES_SAME_SIZE.
2011-09-27 16:03:49 +00:00
Alan Modra 130479b708 daily update 2011-09-27 00:00:06 +00:00
Alan Modra c57c0a06ba daily update 2011-09-26 00:00:05 +00:00
Alan Modra 3efb455c8e daily update 2011-09-25 00:00:06 +00:00
Alan Modra 4d34059fd5 daily update 2011-09-24 00:00:06 +00:00
Alan Modra 6b4a09fc6f daily update 2011-09-23 00:00:05 +00:00
Tristan Gingold 7cf3bbff36 bfd/
2011-09-22  Tristan Gingold  <gingold@adacore.com>

	* configure.in: Bump version to 2.22.51
	* configure: Regenerate.
2011-09-22 08:35:49 +00:00
Alan Modra a3a129def5 daily update 2011-09-22 00:00:05 +00:00
David S. Miller 9e8c70f96b Annotate sparc objects with cpu hardware capabilities used.
bfd/

	* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
	* elfxx-sparc.h: Declare it.
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
	* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.

binutils/

	* readelf.c (display_sparc_hwcaps): New.
	(display_sparc_gnu_attribute): New.
	(process_sparc_specific): New.
	(process_arch_specific): When EM_SPARC, EM_SPARC32PLUS,
	or EM_SPARCV9 invoke process_sparc_specific.

gas/

	* config/tc-sparc.c (hwcap_seen): New bitmask, defined when
	not TE_SOLARIS.
	(sparc_ip): When not TE_SOLARIS, accumulate hwcap bits from
	sparc_opcode->flags of instruction into hwcap_seen.
	(sparc_md_end): Create Tag_GNU_Sparc_HWCAPS attribute if
	hwcap_seen is non-zero and not TE_SOLARIS.

gas/testsuite/

	* gas/sparc/hpcvis3.s: Update for fixed fchksum16 mnemonic.
	* gas/sparc/hpcvis3.d: Likewise.

include/elf/

	* sparc.h (Tag_GNU_Sparc_HWCAPS): New object attribute.
	(ELF_SPARC_HWCAP_*): New HWCAPS bitmask values.

include/opcode/

	* sparc.h (struct sparc_opcode): Expand 'flags' to unsigned int.
	(F_MUL32, F_DIV32, F_FSMULD, F_V8PLUS, F_POPC, F_VIS, F_VIS2,
	F_ASI_BLK_INIT, F_FMAF, F_VIS3, F_HPC, F_RANDOM, F_TRANS,
	F_FJFMAU, F_IMA, F_ASI_CACHE_SPARING): New flag bits.

opcodes/

	* sparc-opc.c (sparc_opcodes): Annotate table with HWCAP flag
	bits.  Fix "fchksm16" mnemonic.
2011-09-21 20:49:16 +00:00
Tristan Gingold 7ba695a99c 2011-09-21 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_convert_section_name_to_bfd): Add comment.
	Deals with size limited strings.
	(bfd_mach_o_build_commands): Initialize more fields.
2011-09-21 10:10:11 +00:00
Alan Modra 5b69b9417d daily update 2011-09-21 00:00:07 +00:00