platform/upstream/binutils.git
8 years agoHardcode host-specific name for LTO plugin 39/38139/2 accepted/tizen_3.0.2015.q2_common accepted/tizen_common accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_base_old accepted/tizen/3.0.2015.q2/common/20150617.115425 accepted/tizen/base/20151223.052217 accepted/tizen/common/20150617.115454 accepted/tizen/mobile/20150618.112654 accepted/tizen/tv/20150618.103536 accepted/tizen/wearable/20150618.093518 submit/tizen_3.0.2015.q2_common/20150617.082128 submit/tizen_base/20151223.111111 submit/tizen_base/20151223.111112 submit/tizen_common/20150617.082114 submit/tizen_mobile/20150617.000001 submit/tizen_tv/20150617.000001 submit/tizen_wearable/20150617.000001 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
Nikolay Bozhenov [Wed, 8 Apr 2015 10:02:40 +0000 (13:02 +0300)]
Hardcode host-specific name for LTO plugin

Otherwise, binutils can try to use plugin for different architecture.

Change-Id: I3070e774ec7f8494241fe52b7aee6d3ba3acef06

8 years agoRevert "skip rpaths" 11/35211/4 accepted/tizen/common/20150604.131348 accepted/tizen/mobile/20150604.132746 accepted/tizen/tv/20150604.132810 accepted/tizen/wearable/20150604.132828 submit/tizen/20150603.065700
Yury Usishchev [Mon, 9 Feb 2015 17:24:33 +0000 (20:24 +0300)]
Revert "skip rpaths"

This reverts commit 56b35ae7eb9f225a2c357f3eff4aabd15eed5afe.

This commit introduced another dependency on environment variable

Change-Id: I1e116c374aed3c0de6f66c528de5b6cf87d2e330
Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
9 years agoRemoved gcore binary since it's a part of gdb 82/35882/2 accepted/tizen/common/20150403.125450 accepted/tizen/mobile/20150406.020157 accepted/tizen/tv/20150406.013638 accepted/tizen/wearable/20150404.083231 submit/tizen/20150331.094343
Vyacheslav Barinov [Wed, 25 Feb 2015 12:40:33 +0000 (15:40 +0300)]
Removed gcore binary since it's a part of gdb

Change-Id: Iefe9d347aa178b323d5e5b9c07c5603a5989942b
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
9 years agoRevert "build as needed" 99/34999/2
Yury Usishchev [Wed, 4 Feb 2015 17:55:30 +0000 (20:55 +0300)]
Revert "build as needed"

This reverts commit b0d634fa440496e36c79b2d37c658989d8cdaa3d.

Change-Id: I77a9c7c82651ee45c97ba51e307c476daad73970
Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
9 years agopackaging: bump to 2.25 accepted/tizen_3.0.2014.q4_common sandbox/vbarinov/2.25 tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common accepted/tizen/3.0.2014.q4/common/20150226.105857 accepted/tizen/common/20150220.083123 accepted/tizen/mobile/20150220.131641 accepted/tizen/tv/20150220.125539 accepted/tizen/wearable/20150220.130119 submit/tizen/20150219.141802 submit/tizen_3.0.2014.q4_common/20150226.000000
Vyacheslav Barinov [Mon, 16 Feb 2015 07:36:14 +0000 (10:36 +0300)]
packaging: bump to 2.25

termcap is now needed for build

Change-Id: I8ae587311b4e4fe5dc5d419f361b0fd3f944ee7c
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
9 years agoremove unused files
Li Jinjing [Mon, 19 Jan 2015 05:57:46 +0000 (13:57 +0800)]
remove unused files

Currently, cross-x86_64-binutils.spec has not been submmited to OBS for building,
for consistency of OBS and gbs, it's necessary to clean it up.

Change-Id: I9d34cd5989006888d65b2f960100429ed49201d1
Signed-off-by: Li Jinjing <jinjingx.li@intel.com>
9 years agoEnable Gold linker for cross-*-binutils build
Ilya Palachev [Fri, 5 Dec 2014 12:25:09 +0000 (15:25 +0300)]
Enable Gold linker for cross-*-binutils build

Change-Id: I52f1fb61ac0c34153e0c50d1859a764de68bb285
Signed-off-by: Ilya Palachev <i.palachev@samsung.com>
9 years agoSwitching ExcludeArch to ExclusiveArch
Vyacheslav Barinov [Fri, 31 Oct 2014 13:13:01 +0000 (16:13 +0300)]
Switching ExcludeArch to ExclusiveArch

Helps to avoid cross-arm -> aarch64 and cross-aarch64 -> arm builds.

Change-Id: Iea31ec9aec7d4ddceeb0401bf820135f342fad30
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
9 years agoAdded relocs-file for aarch64 to configure.tgt
Vyacheslav Barinov [Mon, 22 Sep 2014 09:58:32 +0000 (13:58 +0400)]
Added relocs-file for aarch64 to configure.tgt

This fixes build issue during ld.gold build for aarch64.

Change-Id: If6c7ee19cf49b3db7748c9237b57bf25ec2c5fdc
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
9 years agopackaging: bump to 2.24.90
Chanho Park [Thu, 16 Oct 2014 08:14:52 +0000 (17:14 +0900)]
packaging: bump to 2.24.90

Change-Id: I89d1ebb22ddd66970afcfd79050ebac9ca4e41bc
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agopackaging: unlimit stack size to fix argument list too long error
Chanho Park [Thu, 17 Jul 2014 11:43:47 +0000 (20:43 +0900)]
packaging: unlimit stack size to fix argument list too long error

Change-Id: I2b607c26b2326cbb916b446e5c53d7ad4fe97a51
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agochangelog: update changelog
Chanho Park [Tue, 8 Jul 2014 10:12:27 +0000 (19:12 +0900)]
changelog: update changelog

Change-Id: Ic365966025eb21b21793798bef4213813f8e5087
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agopackaging: support aarch64 build
Chanho Park [Mon, 7 Jul 2014 08:51:13 +0000 (17:51 +0900)]
packaging: support aarch64 build

This patch adds aarch64 releated packaging files to support aarch64.

Change-Id: Ic04208d75d91c6fd3b5d06fcbead7d5f2117b5db
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agoUpgrade to 2.24.51.
Junfeng Dong [Wed, 29 Jan 2014 02:50:30 +0000 (10:50 +0800)]
Upgrade to 2.24.51.

Change-Id: I58129e0fa3824c3f78e7e3ca4358f310131ca849
Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
9 years agoFix wrong source file name of cross-arm-binutils.
Junfeng Dong [Tue, 16 Jul 2013 09:09:59 +0000 (17:09 +0800)]
Fix wrong source file name of cross-arm-binutils.

Change-Id: I4640c2a726e3dde8ce48697e2244d3c0c26e5a12
Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
9 years agoFix gbs packaging problem and disable manifest file for cross toolchain.
Junfeng Dong [Thu, 11 Jul 2013 08:43:22 +0000 (16:43 +0800)]
Fix gbs packaging problem and disable manifest file for cross toolchain.

    Not use macro in %setup to satisfy gbs 0.17 and latter
version. (DEVT-77)
    Not set manifest file for cross toolchain.

Change-Id: I102754fefde7f1ce454cf1ddde4a6b04d1aa3678
Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
9 years agoresetting manifest requested domain to floor
Alexandru Cornea [Fri, 28 Jun 2013 18:56:38 +0000 (21:56 +0300)]
resetting manifest requested domain to floor

9 years agoSet license using %license
Anas Nashif [Sat, 11 May 2013 05:36:36 +0000 (01:36 -0400)]
Set license using %license

9 years agosync other specs
Anas Nashif [Sun, 3 Feb 2013 03:52:50 +0000 (19:52 -0800)]
sync other specs

9 years agoFixed gold installation
Anas Nashif [Sat, 2 Feb 2013 07:17:24 +0000 (23:17 -0800)]
Fixed gold installation

9 years agogold has higher prio
Anas Nashif [Tue, 29 Jan 2013 19:12:24 +0000 (11:12 -0800)]
gold has higher prio

9 years agouse alternatives for gold
Anas Nashif [Tue, 29 Jan 2013 14:10:15 +0000 (06:10 -0800)]
use alternatives for gold

9 years agouse alternatives for gold
Anas Nashif [Tue, 29 Jan 2013 13:56:50 +0000 (05:56 -0800)]
use alternatives for gold

9 years agofixed optimzation for Atom
Anas Nashif [Mon, 26 Nov 2012 21:02:10 +0000 (13:02 -0800)]
fixed optimzation for Atom

9 years agofixed optimzation for Atom
Anas Nashif [Mon, 26 Nov 2012 20:58:03 +0000 (12:58 -0800)]
fixed optimzation for Atom

9 years agoupdate to 2.23.1
Anas Nashif [Mon, 26 Nov 2012 19:36:31 +0000 (11:36 -0800)]
update to 2.23.1

9 years agoadd packaging
Anas Nashif [Tue, 30 Oct 2012 19:48:49 +0000 (12:48 -0700)]
add packaging

9 years agogold depend on opcodes
Anas Nashif [Tue, 30 Oct 2012 19:46:10 +0000 (12:46 -0700)]
gold depend on opcodes

9 years agobuild as needed
Anas Nashif [Tue, 30 Oct 2012 19:44:39 +0000 (12:44 -0700)]
build as needed

9 years agouse hashtype both by default
Anas Nashif [Tue, 30 Oct 2012 19:44:14 +0000 (12:44 -0700)]
use hashtype both by default

9 years agoenable targets gold
Anas Nashif [Tue, 30 Oct 2012 19:43:42 +0000 (12:43 -0700)]
enable targets gold

9 years agotestsuite
Anas Nashif [Tue, 30 Oct 2012 19:43:23 +0000 (12:43 -0700)]
testsuite

9 years agold relro
Anas Nashif [Tue, 30 Oct 2012 19:43:07 +0000 (12:43 -0700)]
ld relro

9 years agold dtags
Anas Nashif [Tue, 30 Oct 2012 19:42:46 +0000 (12:42 -0700)]
ld dtags

9 years agounit at a time
Anas Nashif [Tue, 30 Oct 2012 19:42:23 +0000 (12:42 -0700)]
unit at a time

9 years agox86-64-biarch
Anas Nashif [Tue, 30 Oct 2012 19:42:04 +0000 (12:42 -0700)]
x86-64-biarch

9 years agoskip rpaths
Anas Nashif [Tue, 30 Oct 2012 19:41:34 +0000 (12:41 -0700)]
skip rpaths

9 years agoAdd generated files. upstream-2.25 binutils-2_25 upstream/2.25
Tristan Gingold [Tue, 23 Dec 2014 14:54:51 +0000 (15:54 +0100)]
Add generated files.

9 years agoVersion 2.25
Tristan Gingold [Tue, 23 Dec 2014 14:23:18 +0000 (15:23 +0100)]
Version 2.25

bfd/
2014-12-23  Tristan Gingold  <gingold@adacore.com>

* version.m4: Bump version to 2.25
* configure: Regenerate.

binutils/
2014-12-23  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2014-12-23  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2014-12-23  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2014-12-23  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2014-12-23  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Dec 2014 00:00:57 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Dec 2014 00:00:58 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Dec 2014 00:00:59 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Dec 2014 00:00:57 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoRework the alignment check for BFD_RELOC_MIPS_18_PCREL_S3.
Matthew Fortune [Tue, 16 Dec 2014 12:39:22 +0000 (12:39 +0000)]
Rework the alignment check for BFD_RELOC_MIPS_18_PCREL_S3.

gas/

* config/tc-mips.c (md_apply_fix): Apply alignment check
to the symbol and offset rather than *valP for
BFD_RELOC_MIPS_18_PCREL_S3.  Also update the error message
for BFD_RELOC_MIPS_19_PCREL_S2.

gas/testsuite/

* gas/mips/r6-64.s: Remove .align directives from LDPC
instructions and add further tests for LDPC.
* gas/mips/r6-64-n32.d: remove the NOPs from LDPC expected
output and update for new tests.
* gas/mips/r6-64-n64.d: Likewise.
* gas/mips/ldpc-unalign.l: New file.
* gas/mips/ldpc-unalign.s: Likewise.
* gas/mips/mips.exp: Run ldpc-unalign test.

9 years agoFix all failing FPXX tests for tx39-elf.
Matthew Fortune [Thu, 18 Dec 2014 21:28:07 +0000 (21:28 +0000)]
Fix all failing FPXX tests for tx39-elf.

ld/testsuite/

* ld-mips-elf/attr-gnu-4-00.d: Relax check for ISA extension.
* ld-mips-elf/attr-gnu-4-01.d: Likewise.
* ld-mips-elf/attr-gnu-4-02.d: Likewise.
* ld-mips-elf/attr-gnu-4-03.d: Likewise.
* ld-mips-elf/attr-gnu-4-08.d: Likewise.
* ld-mips-elf/attr-gnu-4-10.d: Likewise.
* ld-mips-elf/attr-gnu-4-11.d: Likewise.
* ld-mips-elf/attr-gnu-4-18.d: Likewise.
* ld-mips-elf/attr-gnu-4-20.d: Likewise.
* ld-mips-elf/attr-gnu-4-22.d: Likewise.
* ld-mips-elf/attr-gnu-4-28.d: Likewise.
* ld-mips-elf/attr-gnu-4-30.d: Likewise.
* ld-mips-elf/attr-gnu-4-33.d: Likewise.
* ld-mips-elf/attr-gnu-4-38.d: Likewise.
* ld-mips-elf/attr-gnu-4-44.d: Likewise.

9 years agoFix undefined weak symbol reloc tests
Matthew Fortune [Thu, 18 Dec 2014 20:08:38 +0000 (20:08 +0000)]
Fix undefined weak symbol reloc tests

ld/testsuite/

* ld-mips-elf/mips-elf.exp: Update undefweak-overflow tests.
* ld-mips-elf/undefweak-overflow-n32.d: Remove.
* ld-mips-elf/undefweak-overflow-n64.d: Likewise.
* ld-mips-elf/undefweak-overflow.s: Set mips64r6, noreorder and
add a label to mark the micromips region.
* ld-mips-elf/undefweak-overflow.d: Update expected output.

9 years agoAdd in a JALRC alias and fix the NAL instruction.
Matthew Fortune [Tue, 16 Dec 2014 13:33:56 +0000 (13:33 +0000)]
Add in a JALRC alias and fix the NAL instruction.

opcodes/

* mips-opc.c (mips_builtin_opcodes): Add JALRC alias for JIALC.
Remove the operand from NAL.

gas/testsuite/

* gas/mips/r6.s: Test JALRC and NAL
* gas/mips/r6-n32.d: Add expected output for JALRC and NAL.
* gas/mips/r6-n64.d: Likewise.
* gas/mips/r6.d: Likewise.

9 years ago[MIPS] When calculating a relocation using an undefined weak symbol don't check for...
Andrew Bennett [Thu, 20 Nov 2014 15:40:16 +0000 (15:40 +0000)]
[MIPS] When calculating a relocation using an undefined weak symbol don't check for overflow.

In MIPS the relocation calculation only ignores the overflow checks for undefined
weak symbols on relocations associated with j/jal.   This patch extends this to
the relocations used by the: b* instructions; pc/gp relative symbol offsets; and the
lwpc/ldpc MIPS r6 instructions.

bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Only check for overflow
on non-weak undefined symbols.

ld/testsuite/
* ld-mips-elf/mips-elf.exp: Add in undefined weak overflow tests for
o32, n32 and n64.
* ld-mips-elf/undefweak-overflow.s: New test.
* ld-mips-elf/undefweak-overflow.d: New test.
* ld-mips-elf/undefweak-overflow-n32.d: New test.
* ld-mips-elf/undefweak-overflow-n64.d: New test.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Dec 2014 00:00:54 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Dec 2014 00:00:49 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Dec 2014 00:00:57 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Dec 2014 00:00:51 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoCheck corrupt input
H.J. Lu [Mon, 15 Dec 2014 16:27:57 +0000 (08:27 -0800)]
Check corrupt input

PR ld/17713
* elflink.c (_bfd_elf_gc_mark_rsec): Check corrupt input.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Dec 2014 00:00:57 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoHandle weak alias for PIE with copy reloc
H.J. Lu [Sun, 14 Dec 2014 07:37:22 +0000 (23:37 -0800)]
Handle weak alias for PIE with copy reloc

When there is a weak symbol with a real definition, the processor
independent code will have arranged for us to see the real definition
first.  We need to copy the needs_copy bit from the real definition and
check it when allowing copy reloc in PIE.

bfd/

PR ld/17689
* elf64-x86-64.c (elf_x86_64_link_hash_entry): Add needs_copy.
Change has_bnd_reloc to bit field.
(elf_x86_64_link_hash_newfunc): Initialize needs_copy and
has_bnd_reloc to 0.
(elf_x86_64_check_relocs): Set has_bnd_reloc to 1 instead
of TRUE.
(elf_x86_64_adjust_dynamic_symbol): Copy needs_copy from the
real definition to a weak symbol.
(elf_x86_64_allocate_dynrelocs): Also check needs_copy of a
weak symbol for PIE when discarding space for relocs against
symbols which turn out to need copy relocs.
(elf_x86_64_relocate_section): Also check needs_copy of a
weak symbol for PIE with copy reloc.

ld/testsuite/

PR ld/17689
* ld-x86-64/pr17689.out: New file.
* ld-x86-64/pr17689.rd: Likewise.
* ld-x86-64/pr17689a.c: Likewise.
* ld-x86-64/pr17689b.S: Likewise.

* ld-x86-64/x86-64.exp: Run PR ld/17689 tests.

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Dec 2014 00:00:45 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Dec 2014 00:00:50 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Dec 2014 00:00:44 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Dec 2014 00:00:54 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoDon't access elf tdata in dwarf.c without first checking for an ELF bfd
Alan Modra [Wed, 10 Dec 2014 03:36:42 +0000 (14:06 +1030)]
Don't access elf tdata in dwarf.c without first checking for an ELF bfd

_bfd_dwarf2_find_nearest_line may be called on a COFF bfd.

* dwarf2.c (read_address): Check bfd_target_elf_flavour before
calling get_elf_backend_data.
(_bfd_dwarf2_find_nearest_line): Fix parens.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Dec 2014 00:00:50 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Dec 2014 00:00:47 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Dec 2014 00:00:48 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Dec 2014 00:00:56 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Dec 2014 00:00:52 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoDefine bfd_elf32_get_synthetic_symtab for x32
H.J. Lu [Fri, 5 Dec 2014 12:52:47 +0000 (04:52 -0800)]
Define bfd_elf32_get_synthetic_symtab for x32

* elf64-x86-64.c (bfd_elf32_get_synthetic_symtab): New.

9 years agoAdd _bfd_elf_ifunc_get_synthetic_symtab
H.J. Lu [Thu, 4 Dec 2014 22:19:41 +0000 (14:19 -0800)]
Add _bfd_elf_ifunc_get_synthetic_symtab

In i386 and x86-64 binaries with ifunc, relocations against .got.plt
section may not be in the same order as entries in PLT section.  This
patch adds _bfd_elf_ifunc_get_synthetic_symtab.  It takes a function
pointer which returns an array of PLT entry symbol values.  It calls
the function pointer to get the PLT entry symbol value array indexed
by relocation index, instead of calling plt_sym_val on each relocation
index.

PR binutils/17677
* elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): New prototype.
* elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): New
function.
* elf32-i386.c (elf_i386_plt_sym_val): Removed.
(elf_backend_plt_sym_val): Likewise.
(elf_i386_get_plt_sym_val): New.
(elf_i386_get_synthetic_symtab): Likewise.
(bfd_elf32_get_synthetic_symtab): Likewise.
* elf64-x86-64.c (elf_x86_64_plt_sym_val): Removed.
(elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
(elf_backend_plt_sym_val): Likewise.
(elf_x86_64_get_plt_sym_val): New.
(elf_x86_64_get_synthetic_symtab): Use
_bfd_elf_ifunc_get_synthetic_symtab.
(bfd_elf64_get_synthetic_symtab): Don't undefine for NaCl.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Dec 2014 00:00:49 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoPowerPC gold, fix 32-bit branch address arithmetic
Alan Modra [Thu, 4 Dec 2014 11:15:05 +0000 (21:45 +1030)]
PowerPC gold, fix 32-bit branch address arithmetic

Mixing 64-bit and 32-bit types led to the wrong promotions.  Keep
calculation in same type.  Also fix a case where PLTREL24 reloc addend
should be ignored.

* Powerpc.cc (Target_powerpc::Branch_info::make_stub): Ignore
addend of PLTREL24 reloc when not generating a plt stub.  Make
max_branch_offset an "Address".
(Target_powerpc::Relocate::relocate): Make max_branch_offset
an "Address".

9 years agopowerpc gold, work around pr17670
Alan Modra [Wed, 3 Dec 2014 05:47:23 +0000 (16:17 +1030)]
powerpc gold, work around pr17670

pr17670 is about an assert triggering on a branch to an undefined
weak symbol, the symbol being undefined due to dropping its comdat
group section.  (Well sort of.  The symbol is actually defined in
an .opd section which isn't part of the group, but the code section
the opd entry points at is dropped.)  So don't assert.
Also, don't make long branch stubs to such symbols, and arrange to
have target-reloc.h code warn when applying relocs that use the sym.

PR 17670
* symtab.cc (Symbol::set_undefined): Remove assertion.
* powerpc.cc (Target_powerpc::symval_for_branch): Don't assert
on symbols defined in discarded sections, instead return false.
Rearrange params, update all callers.
(Target_powerpc::Branch_info::make_stub): Don't make stubs for
branches to syms in discarded sections.
(Global_symbol_visitor_opd::operator()): Set discarded opd syms
undefined and flag as discarded.
(Target_powerpc::Relocate::relocate): Localize variable.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Dec 2014 00:01:02 +0000 (00:01 +0000)]
Automatic date update in version.in

9 years agoReplace copyreloc-main.c with copyreloc-main.S
H.J. Lu [Wed, 3 Dec 2014 16:40:19 +0000 (08:40 -0800)]
Replace copyreloc-main.c with copyreloc-main.S

* ld-x86-64/copyreloc-main.c: Removed.
* ld-x86-64/copyreloc-main.S: New.
* ld-x86-64/x86-64.exp: Replace copyreloc-main.c with
copyreloc-main.S.

9 years agoReformat elf_x86_64_create_dynamic_sections
H.J. Lu [Wed, 3 Dec 2014 16:10:04 +0000 (08:10 -0800)]
Reformat elf_x86_64_create_dynamic_sections

* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Reformat.

9 years agopowerpc gold, fix pr17566
Alan Modra [Wed, 3 Dec 2014 11:26:19 +0000 (21:56 +1030)]
powerpc gold, fix pr17566

Code stolen from arm.cc.

PR 17566
* powerpc.cc (Target_powerpc::Scan::local): Use add_local_section
when adding dynamic relocations against section symbols.

9 years agoX86-64: Allow copy relocs for building PIE
H.J. Lu [Tue, 2 Dec 2014 23:14:28 +0000 (15:14 -0800)]
X86-64: Allow copy relocs for building PIE

This patch allows copy relocs for non-GOT pc-relative relocation in PIE.

bfd/

* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Always
allow copy relocs for building executables.
(elf_x86_64_adjust_dynamic_symbol): Allocate copy relocs for
PIE.
(elf_x86_64_allocate_dynrelocs): For PIE, discard space for
relocs against symbols which turn out to need copy relocs.
(elf_x86_64_relocate_section): Don't copy a pc-relative
relocation into the output file if the symbol needs copy reloc.

ld/testsuite/

* ld-x86-64/copyreloc-lib.c: New file.
* ld-x86-64/copyreloc-main.c: Likewise.
* ld-x86-64/copyreloc-main.out: Likewise.
* ld-x86-64/copyreloc-main1.rd: Likewise.
* ld-x86-64/copyreloc-main2.rd: Likewise.

* ld-x86-64/x86-64.exp: Run copyreloc tests.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Dec 2014 00:00:51 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Dec 2014 00:01:00 +0000 (00:01 +0000)]
Automatic date update in version.in

9 years agoAdd tests for PR ld/16452 and PR ld/16457
H.J. Lu [Mon, 1 Dec 2014 14:06:21 +0000 (06:06 -0800)]
Add tests for PR ld/16452 and PR ld/16457

PR ld/16452
PR ld/16457
* ld-elf/pr16452.map: New file.
* ld-elf/pr16452.od: Likewise.
* ld-elf/pr16452a.c: Likewise.
* ld-elf/pr16452b.c: Likewise.
* ld-elf/pr16457.od: Likewise.

* ld-elf/shared.exp (build_tests): Add tests for PR ld/16452 and
PR ld/16457.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Dec 2014 00:00:49 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoPower4 should treat mftb as extended mfspr mnemonic
Alan Modra [Sat, 29 Nov 2014 08:43:17 +0000 (19:13 +1030)]
Power4 should treat mftb as extended mfspr mnemonic

On further reading of ISA manual it appears gas should have been
treating mftb and mftbu as extended mnemonics for mfspr, for ISA 2.03
and later.

opcodes/
* ppc-opc.c (powerpc_opcodes): Make mftb* generate mfspr for
power4 and later.
gas/testsuite/
* gas/ppc/a2.d: Update for mftb change.
* gas/ppc/476.d: Likewise.

9 years agoDon't deprecate powerpc mftb insn
Alan Modra [Fri, 28 Nov 2014 02:51:52 +0000 (13:21 +1030)]
Don't deprecate powerpc mftb insn

mftb is marked phased out in the architecture manual, but we can keep
it as an extended mnemonic for mftbl.

* ppc-opc.c (powerpc_opcodes <mftb>): Don't deprecate for power7.
(TB): Delete.
(insert_tbr, extract_tbr): Validate tbr number.

9 years agoDon't output symbol version definitions for non-DT_NEEDED libs
Alan Modra [Thu, 27 Nov 2014 04:46:49 +0000 (15:16 +1030)]
Don't output symbol version definitions for non-DT_NEEDED libs

PR 16452, 16457
* elflink.c (_bfd_elf_link_find_version_dependencies): Exclude
symbols from libraries that won't be listed in DT_NEEDED.
(elf_link_output_extsym): Don't output verdefs for such symbols.

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 30 Nov 2014 00:01:05 +0000 (00:01 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Nov 2014 00:00:50 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Nov 2014 00:00:46 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Nov 2014 00:01:07 +0000 (00:01 +0000)]
Automatic date update in version.in

9 years ago[GOLD] PowerPC relaxation corner case
Alan Modra [Wed, 26 Nov 2014 00:25:58 +0000 (10:55 +1030)]
[GOLD] PowerPC relaxation corner case

It's possible for the section grouping code to decide that the last
section looked at (the first section by address) doesn't fit into a
group.  In one case that section is already a group owner and that is
handled correctly.  In other cases the section should be put into its
own group.  Like this:

* powerpc.cc (Stub_control::set_output_and_owner): New function.
(Target_powerpc::group_sections): Use it.

9 years agoFix corrupted .eh_frame section with LTO and --gc-sections.
Cary Coutant [Tue, 25 Nov 2014 21:55:42 +0000 (13:55 -0800)]
Fix corrupted .eh_frame section with LTO and --gc-sections.

Backport from trunk:

When --gc-sections is turned on during an LTO link, the .eh_frame sections
from deferred files are processed before those from the replacement files.
As a result, the section end-cap from crtendS.o is placed ahead of
the .eh_frame data from the replacement files. This patch fixes the bug
by skipping the layout of the deferred sections during GC pass 2.

gold/
PR gold/17639
* object.cc (Sized_relobj_file): Initialize is_deferred_layout_.
(Sized_relobj_file::do_layout): Handle deferred sections properly
during GC pass 1. Don't add reloc sections to deferred list twice.
* object.h (Sized_relobj_file::is_deferred_layout): New function.
(Sized_relobj_file::is_deferred_layout_): New data member.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Nov 2014 00:01:02 +0000 (00:01 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Nov 2014 00:01:45 +0000 (00:01 +0000)]
Automatic date update in version.in

9 years ago[AArch64] Cortex-A53 Erratum 835769 -- sort maps
Jiong Wang [Mon, 24 Nov 2014 13:49:48 +0000 (13:49 +0000)]
[AArch64] Cortex-A53 Erratum 835769 -- sort maps

2014-11-24  Tejas Belagod  <tejas.belagod@arm.com>

  bfd/
    * elfnn-aarch64.c (elf_aarch64_compare_mapping): New.
    (erratum_835769_scan): Sort map list.

9 years agoPowerPC64 --plt-align
Alan Modra [Mon, 24 Nov 2014 02:11:33 +0000 (12:41 +1030)]
PowerPC64 --plt-align

Alignment of plt stubs was broken, firstly because the option was
being dropped due to the alignment value not being set in the "params"
struct used in elf64-ppc.c, and secondly due to not calculating the
number of alignment boundary crossings correctly.

bfd/
* elf64-ppc.c (plt_stub_pad): Correct.
ld/
* ld.texinfo: Correct --plt-align documentation.
* emultempl/ppc64elf.em (plt_stub_align): Delete.  Use and set
params.plt_stub_align instead.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Nov 2014 00:00:56 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Nov 2014 00:00:59 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Nov 2014 00:00:56 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Nov 2014 00:00:52 +0000 (00:00 +0000)]
Automatic date update in version.in

9 years agoPPC gold doesn't check for overflow properly
Alan Modra [Thu, 20 Nov 2014 21:45:04 +0000 (08:15 +1030)]
PPC gold doesn't check for overflow properly

* powerpc.cc (Target_powerpc::Relocate::relocate): Correct test
for undefined weaks.

9 years agoPPC gold doesn't check for overflow properly
Alan Modra [Thu, 20 Nov 2014 08:31:23 +0000 (19:01 +1030)]
PPC gold doesn't check for overflow properly

Corrects overflow test for rel14, addr14, rel24, addr24 branch relocs,
and prints an information message to give a hint as to how a branch
that can't reach a stub might be cured.

bfd/
* elf64-ppc.c (group_sections): Init stub14_group_size from
--stub-group-size parameter divided by 1024.
gold/
* powerpc.cc (Stub_control::Stub_control): Init stub14_group_size_
from --stub-group-size parameter divided by 1024.
(Powerpc_relocate_functions::rela, rela_ua): Add fieldsize
template parameter.  Update all uses.
(Target_powerpc::Relocate::relocate): Rename has_plt_value to
has_stub_value.  Set for long branches.  Don't report overflow for
branch to undefined weak symbols.  Print info message on
overflowing branch to stub.

9 years agoppc476 workaround sizing
Alan Modra [Thu, 20 Nov 2014 10:37:58 +0000 (21:07 +1030)]
ppc476 workaround sizing

* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
alignment calculation.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Nov 2014 00:00:47 +0000 (00:00 +0000)]
Automatic date update in version.in