Apply mainline patches
2011-11-15 Maciej W. Rozycki <macro@codesourcery.com>
* write.c (dump_section_relocs): Don't convert PC-relative relocs
that have an in-place addend narrower than the addresses used.
gas/
Apply mainline patches
2011-11-14 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (can_swap_branch_p): Exclude microMIPS
variant frags too.
gas/testsuite/
Apply mainline patches
2011-11-14 Maciej W. Rozycki <macro@codesourcery.com>
* gas/mips/relax-swap3.d: New test.
* gas/mips/mips16@relax-swap3.d: Likewise.
* gas/mips/micromips@relax-swap3.d: Likewise.
* gas/mips/relax-swap3.s: New test source.
* gas/mips/mips.exp: Run the new tests.
nobody [Mon, 14 Nov 2011 13:43:24 +0000 (13:43 +0000)]
This commit was manufactured by cvs2svn to create branch 'binutils-
2_22-branch'.
Cherrypick from master 2011-11-14 13:43:23 UTC Maciej W. Rozycki <macro@linux-mips.org> ' gas/':
gas/testsuite/gas/mips/micromips@relax-swap3.d
gas/testsuite/gas/mips/mips16@relax-swap3.d
gas/testsuite/gas/mips/relax-swap3.d
gas/testsuite/gas/mips/relax-swap3.s
Apply mainline patches.
2011-11-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld/testsuite/ld-arm/jump-reloc-veneers.s: Update for changes to assembler output.
Alan Modra [Tue, 8 Nov 2011 13:46:37 +0000 (13:46 +0000)]
bfd/
* elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename
ha_relocs_not_using_r2 to unexpected_toc_insn.
(ok_lo_toc_insn): New function.
(ppc64_elf_edit_toc): Check insn on lo toc reloc. Emit warning.
(ppc64_elf_relocate_section): Don't check insn on lo toc reloc here.
Handle addic on lo toc reloc.
ld/testsuite/
* ld-powerpc/powerpc.exp: Expect ld warnings for tocopt test.
* ld-powerpc/tocopt.out: New file.
Alan Modra [Tue, 25 Oct 2011 03:14:16 +0000 (03:14 +0000)]
2011-10-20 Alan Modra <amodra@gmail.com>
* elf32-i386.c (i386_opcode16): Delete.
(elf_i386_check_tls_transition): Use memcmp to compare contents.
* elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete.
(elf_x86_64_check_tls_transition): Use memcmp to compare contents.
Alan Modra [Tue, 25 Oct 2011 03:13:32 +0000 (03:13 +0000)]
PR ld/13311
2011-10-19 Alan Modra <amodra@gmail.com>
* elflink.c (elf_link_output_extsym): Correct test for warning when
forced local executable syms are referenced from shared libraries.
Alan Modra [Tue, 25 Oct 2011 03:08:40 +0000 (03:08 +0000)]
PR binutils/13278
2011-10-16 H.J. Lu <hongjiu.lu@intel.com>
* ar.c (open_inarch): Set the target from the the first object
on the list only if it isn't set.
Alan Modra [Tue, 25 Oct 2011 03:04:34 +0000 (03:04 +0000)]
PR binutils/13278
2011-10-11 Alan Modra <amodra@gmail.com>
* 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.
Alan Modra [Tue, 25 Oct 2011 03:03:14 +0000 (03:03 +0000)]
PR binutils/13257
2011-10-11 Alan Modra <amodra@gmail.com>
* archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
thin archive element using container target if not defaulted.
Alan Modra [Tue, 25 Oct 2011 02:52:23 +0000 (02:52 +0000)]
Apply mainline patches
2011-10-08 Alan Modra <amodra@gmail.com>
* elflink.c (elf_link_output_extsym): Strip defined plugin symbols
even when strip_discarded is false.
Alan Modra [Tue, 25 Oct 2011 02:48:54 +0000 (02:48 +0000)]
Apply mainline patches
opcodes/
2011-09-28 Jan Beulich <jbeulich@suse.com>
* ppc-opc.c (insert_nbi, insert_rbx, FRAp, FRBp, FRSp, FRTp, NBI, RAX,
RBX): New.
(insert_bo, insert_boe): Reject bcctr with bit 2 in bo unset.
(powerpc_opcodes): Use RAX for second and RBXC for third operand of
lswx. Use NBI for third operand of lswi. Use FRTp for first operand of
lfdp and lfdpx. Use FRSp for first operand of stfdp and stfdpx, and
mark them as invalid on POWER7. Use FRTp, FRAp, and FRBp repsectively
on DFP quad instructions.
gas/testsuite/
2011-09-28 Jan Beulich <jbeulich@suse.com>
* gas/ppc/476.s: Fix lswi first operand.
* gas/ppc/476.d: Adjust expected output.
* gas/ppc/a2.s: Fix lswi first operand.
* gas/ppc/a2.d: Adjust expected output.
* gas/ppc/power6.s: Fix lfdpx first operand.
* gas/ppc/power6.d: Adjust expected output.
Alan Modra [Tue, 25 Oct 2011 02:46:10 +0000 (02:46 +0000)]
PR ld/13235
Apply mainline patches
bfd/
2011-09-30 Alan Modra <amodra@gmail.com>
* 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/
2011-09-30 Alan Modra <amodra@gmail.com>
* ld-powerpc/tocopt.d: Update.
* ld-powerpc/tocopt5.d, * ld-powerpc/tocopt5.s: New test.
* ld-powerpc/powerpc.exp: Run new test.
David S. Miller [Wed, 19 Oct 2011 00:38:54 +0000 (00:38 +0000)]
Fix sparc TLS call relaxation when the delay slot sets up %o0.
bfd/
PR binutils/13301
* elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function.
(_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr
call delay slot instruction forward 4 bytes when performing
relaxation.
gold/
PR binutils/13301
* sparc.cc (Target_sparc::Relocate::reloc_adjust_addr_): New
member to track relocation locations that have moved during TLS
reloc optimizations.
(Target_sparc::Relocate::Relocate): Initialize to NULL.
(Target_sparc::Relocate::relocate): Adjust view down by 4
bytes if it matches reloc_adjust_addr_.
(Target_sparc::Relocate::relocate_tls): Always move the
__tls_get_addr call delay slot instruction forward 4 bytes when
performing relaxation.
ld/testsuite/
* ld-sparc/tlssunbin32.dd: Update for TLS call relaxation fix
for PR 13301.
* ld-sparc/tlssunbin64.dd: Likewise.
* ld-sparc/tlssunpic32.dd: Likewise.
* ld-sparc/tlssunpic64.dd: Likewise.
* 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.
nobody [Sat, 8 Oct 2011 16:51:12 +0000 (16:51 +0000)]
This commit was manufactured by cvs2svn to create branch 'binutils-
2_22-branch'.
Cherrypick from master 2011-10-08 16:51:11 UTC H.J. Lu <hjl.tools@gmail.com> 'Preserve the maximum alignment/size for common symbols.':
ld/testsuite/ld-elf/pr13250-1.c
ld/testsuite/ld-elf/pr13250-2.c
ld/testsuite/ld-elf/pr13250-3.c
H.J. Lu [Wed, 5 Oct 2011 16:39:55 +0000 (16:39 +0000)]
Fix --gc-sections failure with symbol versioning.
bfd/
2011-09-29 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-29 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13195
* ld-elf/elf.exp: Add a C link testcase for PR ld/13195.