]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
6 years agoPR22836 testcases
Alan Modra [Wed, 14 Feb 2018 01:08:03 +0000 (11:38 +1030)] 
PR22836 testcases

PR 22836
* testsuite/ld-elf/pr22836-1.s: New file.
* testsuite/ld-elf/pr22836-1a.d: Likewise.
* testsuite/ld-elf/pr22836-1b.d: Likewise.

(cherry picked from commit 60f763ee16fca2cd1ec9fa6960f765de9b26ef70)

6 years agoPR22836, "-r -s" doesn't work with -g3 using GCC 7
Alan Modra [Tue, 13 Feb 2018 03:39:48 +0000 (14:09 +1030)] 
PR22836, "-r -s" doesn't work with -g3 using GCC 7

This fixes the case where all of a group is removed with ld -r, the
situation in the PR, and failures where part of a group is removed
that contain relocs.

bfd/
PR 22836
* elf.c (_bfd_elf_fixup_group_sections): Account for removed
relocation sections.  If size reduces to just the flag word,
remove that too and mark with SEC_EXCLUDE.
* elflink.c (bfd_elf_final_link): Strip empty group sections.
binutils/
* testsuite/binutils-all/group-7.s,
* testsuite/binutils-all/group-7a.d,
* testsuite/binutils-all/group-7b.d,
* testsuite/binutils-all/group-7c.d: New tests.
* testsuite/binutils-all/objcopy.exp: Run them.
ld/
* testsuite/ld-elf/pr22836-2.d,
* testsuite/ld-elf/pr22836-2.s: New test.

(cherry picked from commit 6e5e9d58c1eeef5677c90886578a895cb8c164c5)

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Mar 2018 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Mar 2018 00:02:11 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Mar 2018 00:01:56 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years ago[ARM] Fix bxns mask
Thomas Preud'homme [Fri, 16 Mar 2018 14:18:53 +0000 (14:18 +0000)] 
[ARM] Fix bxns mask

Bit 7 of BXNS is a fixed bit which distinguish it from BLXNS. Yet it is
not set in the disassembler entry mask. This commit fixes that.

2018-03-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>

Backport from mainline
2018-02-19  Thomas Preud'homme  <thomas.preudhomme@arm.com>

opcodes/
* arm-dis.c (thumb_opcodes): Fix BXNS mask.

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Mar 2018 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Mar 2018 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoGC: Also check the local debug definition section
H.J. Lu [Wed, 14 Mar 2018 11:23:24 +0000 (04:23 -0700)] 
GC: Also check the local debug definition section

Extend

commit b7c871edcd83ccdc5fcd8148a7f433efd6b52255
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed May 17 07:57:15 2017 -0700

    Mark debug sections referenced by kept debug sections

to handle the local debug definition section.

bfd/

PR ld/20882
* elflink.c (elf_gc_mark_debug_section): Also check the local
debug definition section.

ld/

PR ld/20882
* testsuite/ld-gc/pr20882.d: Also dump and check .debug_abbrev
section.
* testsuite/ld-gc/pr20882b.s: Add .debug_abbrev section.

(cherry picked from commit 9e223787a474c672c5f1cfd4574857241ae4eafa)

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Mar 2018 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Mar 2018 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Mar 2018 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Mar 2018 00:02:33 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Mar 2018 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Mar 2018 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Mar 2018 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Mar 2018 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Mar 2018 00:01:54 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Mar 2018 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Mar 2018 00:02:13 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Mar 2018 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Mar 2018 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Mar 2018 00:01:55 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoIA-64: Fix linker error with --no-keep-memory.
Jim Wilson [Wed, 28 Feb 2018 18:03:31 +0000 (10:03 -0800)] 
IA-64: Fix linker error with --no-keep-memory.

Import patch from mainline:
2018-02-26  Jim Wilson  <jimw@sifive.com>
Stephan Schreiber <info@fs-driver.org>

PR 15904
* elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
call, set changed_contents and changed_relocs.  Likewise after
successful ia64_elf_relax_br call.

6 years agoEnable link time garbage collection for the IA64 target.
Nick Clifton [Wed, 28 Feb 2018 14:11:47 +0000 (14:11 +0000)] 
Enable link time garbage collection for the IA64 target.

Import patch from the mainline:
2018-02-20  Jason Duerstock  <jason.duerstock@gmail.com>

* elfnn-ia64.c (elf_backend_can_gc_sections): Enable.

6 years agoUpdated Russian translation for the gas sub-directory and a new Portuguese translatio...
Nick Clifton [Wed, 28 Feb 2018 09:04:52 +0000 (09:04 +0000)] 
Updated Russian translation for the gas sub-directory and a new Portuguese translation for the binutils sub-directory.

gas * po/ru.po: Updated Russian translation.

binutils* po/pt.po: New Portuguese translation.
* configure.ac (ALL_LINGUAS): Add pt.
* configure: Regenerate.

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Feb 2018 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 27 Feb 2018 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Feb 2018 00:01:53 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Feb 2018 00:02:12 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Feb 2018 00:01:41 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoImport patch from mainline to fix memory corruption in MIPS assembler.
Nick Clifton [Fri, 23 Feb 2018 11:10:42 +0000 (11:10 +0000)] 
Import patch from mainline to fix memory corruption in MIPS assembler.

PR 22014
gas * config/tc-mips.c (mips_lookup_insn): Use memmove to strip the
instruction size suffix.

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Feb 2018 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Feb 2018 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Feb 2018 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Feb 2018 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Feb 2018 00:01:46 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Feb 2018 00:02:12 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Feb 2018 00:01:41 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoFix AArch32 build attributes for Armv8.4-A.
Tamar Christina [Thu, 15 Feb 2018 17:08:14 +0000 (17:08 +0000)] 
Fix AArch32 build attributes for Armv8.4-A.

backported from master.

The build attribute number for Armv8.4-A is currently incorrectly set to that of Armv8-M.
This patch fixes that by setting it as part of the Armv8-A family and adds a test for it.

gas/
2018-02-16  Tamar Christina  <tamar.christina@arm.com>

* config/tc-arm.c (cpu_arch_ver): Renumber ARM_ARCH_V8_4A.
* testsuite/gas/arm/attr-march-armv8_4-a.d: New.

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Feb 2018 00:01:51 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoImport patch from mainline to fix a bug that would place executable and non-executabl...
Nick Clifton [Thu, 15 Feb 2018 16:21:02 +0000 (16:21 +0000)] 
Import patch from mainline to fix a bug that would place executable and non-executables pages in the same segment.

PR 22758
bfd * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
segment when demand paged with lma on the same page.  Test this
before load/non-load, executable/non-executable,
writable/non-writable tests and simplify.  Delete bogus relro
condition in writable/non-writable test.  Delete outdated
comment.  Formatting.

6 years agoPR ld/22832 on SPARC.
Eric Botcazou [Thu, 15 Feb 2018 14:55:11 +0000 (15:55 +0100)] 
PR ld/22832 on SPARC.

The fix for PR ld/22727 on SPARC passed TRUE as the 'create' argument
in the call to bfd_link_hash_lookup.  It turns out this was a bad idea
because, if the symbol is created at this point, the link will abort
later in elf_link_output_extsym.  This changes the TRUE into a FALSE
and puts an assertion on the result of the call, making it easier to
debug the issue; that's exactly in keeping with what Gold does.

bfd/
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
and assert that the result of the call is not NULL.

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Feb 2018 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agogas: xtensa: fix trampoline placement
Max Filippov [Sun, 11 Feb 2018 05:59:54 +0000 (21:59 -0800)] 
gas: xtensa: fix trampoline placement

For jumps requiring multiple trampolines trampoline placement code may
place multiple sequential trampolines into the same frag. Don't do that.

gas/
2018-02-14  Max Filippov  <jcmvbkbc@gmail.com>

Backport from mainline
2018-02-13  Max Filippov  <jcmvbkbc@gmail.com>

* config/tc-xtensa.c (xg_find_best_trampoline): Skip trampoline
frag that contains source address.

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Feb 2018 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Feb 2018 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoUpdated Russian translation for the gas sub-directory.
Nick Clifton [Mon, 12 Feb 2018 12:12:00 +0000 (12:12 +0000)] 
Updated Russian translation for the gas sub-directory.

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Feb 2018 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Feb 2018 00:02:00 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoFix PR gas/22738 (.dc.a directive has wrong size on SPARC 64-bit).
Eric Botcazou [Mon, 29 Jan 2018 23:13:51 +0000 (00:13 +0100)] 
Fix PR gas/22738 (.dc.a directive has wrong size on SPARC 64-bit).

The .dc.a directive has wrong size (32 bits) on SPARC 64-bit because
the assembler sets the correct BFD architecture only at the very end
of the processing and it's too late for the directive.  It's fixed by
defining TARGET_MACH and making it return a sensible default value.

gas/
* config/tc-sparc.h (sparc_mach): Declare.
(TARGET_MACH): Define to above.
* config/tc-sparc.c (sparc_mach): New function.
(sparc_md_end): Minor tweak.
ld/
* testsuite/ld-elf/pr22450.d: Remove reference to SPARC64.

6 years agoFix GOT relocation overflow on SPARC.
Eric Botcazou [Sat, 10 Feb 2018 01:30:25 +0000 (02:30 +0100)] 
Fix GOT relocation overflow on SPARC.

There are 2 failures left in the linker testsuite on SPARC64/Linux and
they are caused by 2 different issues leading to the same end effect:
the overflow of the relocation section for the GOT, i.e. the linker
generates too many dynamic relocations for the GOT wrt the size of the
relocation section, leading to memory corruption and missing relocations
in the final binary.

The first issue was introduced by:
  https://sourceware.org/ml/binutils/2017-06/msg00368.html
which makes the linker generate more R_SPARC_RELATIVE relocations for
the GOT without adjusting the size of the relocation section.  This is
fixed by (1) preventively adjusting this size in allocate_dynrelocs and
(2) generating R_SPARC_NONE if needed when R_SPARC_GOTDATA_OP is relaxed.

The second issue is that we generate a GOT relocation for an undefined
weak symbol with non-default visibility in a PIC binary without accounting
for that  in the size of the relocation section.  Since the address of the
symbol should resolve to 0 at run time, it is fixed by not generating the
relocation at all, i.e. leaving the GOT entry zeroed.

bfd/
* elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
(sparc_elf_append_rela): Assert that there is enough room in section.
(_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
(_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
(allocate_dynrelocs): Remove outdated comments and reorder conditions.
For a symbol subject to a GOT relocation, reserve a slot in the
relocation section if the symbol isn't dynamic and we are in PIC mode.
(_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
<R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
<R_SPARC_PC10>: Reorder conditions.  Remove always-false assertion.
(_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
resolved_to_zero.  Do not generate a dynamic GOT relocation for an
undefined weak symbol with non-default visibility.  Remove superfluous
'else' and fix formatting.

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Feb 2018 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoImport patch from mainline to fix possible seg-fault whilst parsing corrupt ELF notes...
Nick Clifton [Fri, 9 Feb 2018 09:28:45 +0000 (09:28 +0000)] 
Import patch from mainline to fix possible seg-fault whilst parsing corrupt ELF notes with extravagent alignments.

PR 22788
* elf.c (elf_parse_notes): Reject notes with excessuively large
alignments.

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Feb 2018 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Feb 2018 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoRevert "PowerPC PLT speculative execution barriers"
Alan Modra [Mon, 5 Feb 2018 02:47:52 +0000 (13:17 +1030)] 
Revert "PowerPC PLT speculative execution barriers"

This reverts most of commit d847d5180e.
Left in place are addition of --no-plt-align to some ppc32 ld tests
and the ld.texinfo --no-plt-thread-safe fix.

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Feb 2018 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Feb 2018 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years ago[PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against absolution...
Renlin Li [Sat, 3 Feb 2018 13:18:17 +0000 (13:18 +0000)] 
[PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against absolution symbol or undefine symbol in shared object.

backport from mainline

bfd/

2018-02-05  Renlin Li  <renlin.li@arm.com>

PR ld/22764
* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
check for writeable section as well.

ld/

2018-02-05  Renlin Li  <renlin.li@arm.com>

PR ld/22764
* testsuite/ld-aarch64/emit-relocs-258.s: Define symbol as an address.
* testsuite/ld-aarch64/emit-relocs-259.s: Likewise.
* testsuite/ld-aarch64/aarch64-elf.exp: Run new test.
* testsuite/ld-aarch64/pr22764.s: New.
* testsuite/ld-aarch64/pr22764.d: New.

6 years agoUpdated Brazillian portuguese and Russian translation
Nick Clifton [Mon, 5 Feb 2018 12:59:09 +0000 (12:59 +0000)] 
Updated Brazillian portuguese and Russian translation

6 years agoImport patch from mainline to remove PROVODE qualifiers around definitions of __CTOR_...
Nick Clifton [Mon, 5 Feb 2018 09:12:42 +0000 (09:12 +0000)] 
Import patch from mainline to remove PROVODE qualifiers around definitions of __CTOR_LIST__ and __DTOR_LIST__ in PE linker scripts.

PR 22762
* scripttempl/pe.sc: Remove PROVIDE()s from __CTOR_LIST__ and
__DTOR_LIST__ symbols.  Add a comment explaining why this is
necessary.
* scripttemp/pep.sc: Likewise.
* ld.texinfo (PROVIDE): Add a note about the effect of common
symbols.

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Feb 2018 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Feb 2018 00:02:05 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAdd support for DWARF-4 line number tables.
Cary Coutant [Sat, 3 Feb 2018 01:44:27 +0000 (17:44 -0800)] 
Add support for DWARF-4 line number tables.

Reads the maximum_operations_per_instruction field, added in DWARF-4 to the
line number program header.

gold/
* PR gold/22776
* dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): Add
support for DWARF-4 line number tables.
* dwarf_reader.h (Sized_dwarf_line_info::max_ops_per_insn): New field.

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Feb 2018 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Feb 2018 00:02:20 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Feb 2018 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Jan 2018 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Jan 2018 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoUpdate Russian translation for the gas sub-directory
Nick Clifton [Mon, 29 Jan 2018 13:50:46 +0000 (13:50 +0000)] 
Update Russian translation for the gas sub-directory

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Jan 2018 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Jan 2018 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoRevert to development on the 2.30 branch. Set the version number to 2.30.0.
Nick Clifton [Sat, 27 Jan 2018 15:46:38 +0000 (15:46 +0000)] 
Revert to development on the 2.30 branch.  Set the version number to 2.30.0.

bfd * version.m4 (BFD_VERSION): Set to 2.30.0
* development.sh: Set to true.
* configure: Regenerate.
* po/bfd.pot: Regenerate.

binutils* configure: Regenerate.
gas * configure: Regenerate.
gprof * configure: Regenerate.
ld * configure: Regenerate.
opcodes * configure: Regenerate.
* po/opcodes.pot: Regenerate.

6 years agoUpdate version number and development status for the 2.30 release. binutils-2_30
Nick Clifton [Sat, 27 Jan 2018 15:09:19 +0000 (15:09 +0000)] 
Update version number and development status for the 2.30 release.

bfd * version.m4 (BFD_VERSION): Set to 2.30
* development.sh: Set to false.
* configure: Regenerate.
* po/bfd.pot: Regenerate.

binutils* configure: Regenerate.
gas * configure: Regenerate.
gold * configure: Regenerate.
* po/gold.pot: Regenerate.
gprof * configure: Regenerate.
ld * configure: Regenerate.
* po/ld.pot: Regenerate.
opcodes * configure: Regenerate.
* po/opcodes.pot: Regenerate.

6 years agoRevert the optimization of the placement of LTO objects as a temporary solution for...
Nick Clifton [Sat, 27 Jan 2018 14:53:19 +0000 (14:53 +0000)] 
Revert the optimization of the placement of LTO objects as a temporary solution for PR 22751.

PR 22751
Revert this change as a temporary solution for this PR:

2017-09-02  Alan Modra  <amodra@gmail.com>

* ldlang.h (lang_input_statement_type): Expand comments.
(LANG_FOR_EACH_INPUT_STATEMENT): Rewrite without casts.
* ldlang.c (lang_for_each_input_file): Likewise.
(load_symbols): Set usrdata for archives.
(find_rescan_insertion): New function.
(lang_process): Trim off and reinsert entries added to file chain
when rescanning archives for LTO.
* ldmain.c (add_archive_element): Set my_archive input_statement
next pointer to last element added.

6 years agoUpdated Russian translation for the bfd sub-directory
Nick Clifton [Sat, 27 Jan 2018 14:25:02 +0000 (14:25 +0000)] 
Updated Russian translation for the bfd sub-directory

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Jan 2018 00:02:37 +0000 (00:02 +0000)] 
Automatic date update in version.in

6 years agoMIPS/GAS: Correct default ABI selection for `mips64*-ps2-elf*'
Maciej W. Rozycki [Fri, 26 Jan 2018 22:29:47 +0000 (22:29 +0000)] 
MIPS/GAS: Correct default ABI selection for `mips64*-ps2-elf*'

Correct an issue with the `mips64*-ps2-elf*' target introduced with
commit e407c74b5b60 ("Support for MIPS R5900 (Sony Playstation 2)"),
<https://sourceware.org/ml/binutils/2012-12/msg00240.html> and make
the n32 ABI the default for GAS, consistently with how BFD and LD
are configured for this target.

gas/
* configure.ac: Also set `mips_default_abi' to N32_ABI for
`mips64*-ps2-elf*'.
* configure: Regenerate.

(cherry picked from commit 0984958bd1d20245e4d42888a697b6015dc6172f)

6 years agoPowerPC64 .branch_lt size change leads to "stubs don't match calculated size"
Alan Modra [Fri, 26 Jan 2018 01:55:09 +0000 (12:25 +1030)] 
PowerPC64 .branch_lt size change leads to "stubs don't match calculated size"

https://bugzilla.redhat.com/show_bug.cgi?id=1523457

I haven't analyzed this myself, I'm relying on Nick's excellent
analysis.  What I believe is happening is that after some number of
stub sizing iterations, a long-branch stub needs to be converted to a
plt-branch, but either due to stub alignment or other stubs shrinking
in size, the stub group section size doesn't change.

That means we exit from ppc64_elf_size_stubs after sizing with an
incorrect layout, in fact the additional .branch_lt entry overlays
.got!  Since .TOC. is normally set to .got + 0x8000 the stub sizing
code decides that entry is within +/-32k of the TOC pointer and so a
three insn stub is sufficient.  When we come to build the stubs using
a correct non-overlaying layout, a four insn plt-branch stub is
generated and the stub group size doesn't match that calculated
earlier.

* elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
.branch_lt changes size.

(cherry picked from commit ba21f5646454c418e75eb06f6bf1a00a173641ca)

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Jan 2018 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoFix PR ld/22727 (TLS breakage in PIC/PIE mode on SPARC).
Eric Botcazou [Thu, 25 Jan 2018 11:16:06 +0000 (12:16 +0100)] 
Fix PR ld/22727 (TLS breakage in PIC/PIE mode on SPARC).

There are actually 2 different bugs:
 1. TLS transition is broken in PIE mode.
 2. TLS is broken in PIC/PIE mode when the __tls_get_addr symbol
    is versioned  (as is the case on Linux and Solaris at least).

The 1st bug is fixed by reverting the problematic change for now
(note that the associated test doesn't pass on SPARC because of another
issue so there is  no formal regression in the testsuite). The 2nd bug
is fixed by changing the  call to _bfd_generic_link_add_one_symbol
on __tls_get_addr into a mere lookup in _bfd_sparc_elf_check_relocs.

bfd/
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
Do a mere lookup of the __tls_get_addr symbol instead of adding it.

Revert
2017-10-19  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/22263
* elfxx-sparc.c (sparc_elf_tls_transition): Replace
bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
bfd_link_executable for TLS check.
(_bfd_sparc_elf_check_relocs): Likewise.
(allocate_dynrelocs): Likewise.
(_bfd_sparc_elf_relocate_section): Likewise.
ld/
* testsuite/ld-sparc/sparc.exp (32-bit: Helper shared library):
Link with a version script.
(32-bit: TLS -fpie): New test.
(64-bit: Helper shared library): Link with a version script.
(64-bit: TLS -fpie): New test.
(64-bit: GOTDATA relocations): Pass -Av9 to the assembler.
* testsuite/ld-sparc/tlslib.ver: New file.
* testsuite/ld-sparc/tlspie32.dd: Likewise.
* testsuite/ld-sparc/tlspie32.s: Likewise.
* testsuite/ld-sparc/tlspie64.dd: Likewise.
* testsuite/ld-sparc/tlspie64.s: Likewise.
* testsuite/ld-sparc/tlssunbin32.dd: Adjust for versioned symbol.
* testsuite/ld-sparc/tlssunbin32.rd: Likewise.
* testsuite/ld-sparc/tlssunbin32.sd: Likewise.
* testsuite/ld-sparc/tlssunbin64.dd: Likewise.
* testsuite/ld-sparc/tlssunbin64.rd: Likewise.
* testsuite/ld-sparc/tlssunbin64.sd: Likewise.

6 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Jan 2018 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoFix printing the size of GOLD's memory areana on Cygwin based systems.
Franz Sirl [Wed, 24 Jan 2018 13:39:11 +0000 (13:39 +0000)] 
Fix printing the size of GOLD's memory areana on Cygwin based systems.

I just stumbled over this with 2.29.1 while building a cross-toolchain, on Cygwin64, but it's still the same for 2.30. m.arena has size_t on Cygwin64 and thus errors out due to -Werror=format.

gold * main.cc: Print m.arena as long long.

6 years agoRegenerate configure file in gprof sub-directory
Nick Clifton [Wed, 24 Jan 2018 13:29:18 +0000 (13:29 +0000)] 
Regenerate configure file in gprof sub-directory

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Jan 2018 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoReset the version number on the 2.30 branch to 2.29.90, since the release has not...
Nick Clifton [Tue, 23 Jan 2018 11:01:03 +0000 (11:01 +0000)] 
Reset the version number on the 2.30 branch to 2.29.90, since the release has not happened yet...

2018-01-23  Nick Clifton  <nickc@redhat.com>

* configure: Regenerate.

6 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Jan 2018 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoGAS/doc: Correct `.set nomips16e2' directive description syntax
Maciej W. Rozycki [Mon, 22 Jan 2018 21:06:35 +0000 (13:06 -0800)] 
GAS/doc: Correct `.set nomips16e2' directive description syntax

gas/
* doc/c-mips.texi (MIPS ASE Instruction Generation Overrides):
Correct syntax of the `.set nomips16e2' directive description.

(cherry picked from commit 75c80ee120e7d1bfb78570aa89d8d8fec6812d0f)

6 years agobinutils/doc: Fix a "using" typo in `objcopy --rename-section' description
Maciej W. Rozycki [Mon, 22 Jan 2018 21:05:56 +0000 (13:05 -0800)] 
binutils/doc: Fix a "using" typo in `objcopy --rename-section' description

binutils/
* doc/binutils.texi (objcopy): Fix a typo in `--rename-section'
option description.

(cherry picked from commit 1ea332d6931ea097d0128578a578528262df8445)

6 years agoMAINTAINERS: Update my company e-mail address
Maciej W. Rozycki [Mon, 22 Jan 2018 15:38:09 +0000 (07:38 -0800)] 
MAINTAINERS: Update my company e-mail address

Following my recent transition from Imagination Technologies to the
reincarnated MIPS company update MAINTAINERS entries accordingly.

binutils/
* MAINTAINERS: Update my company e-mail address.

gdb/
* MAINTAINERS: Update my company e-mail address.

sim/
* MAINTAINERS: Update my company e-mail address.

(cherry picked from commit d65ce302abcb260e14ca5f201b78e8e6d4a2e720)

6 years agoUpdate Swedish translation for the binutils sub-directory
Nick Clifton [Mon, 22 Jan 2018 13:47:14 +0000 (13:47 +0000)] 
Update Swedish translation for the binutils sub-directory

6 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Jan 2018 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Jan 2018 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agox86: Check the versioned __tls_get_addr symbol
H.J. Lu [Sat, 20 Jan 2018 22:25:24 +0000 (14:25 -0800)] 
x86: Check the versioned __tls_get_addr symbol

We need to check the versioned __tls_get_addr symbol when looking up
"__tls_get_addr".

bfd/

PR ld/22721
* elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
versioned __tls_get_addr symbol.

ld/

PR ld/22721
* testsuite/ld-plugin/lto.exp: Run PR ld/22721 tests.
* testsuite/ld-plugin/pr22721.t: New file.
* testsuite/ld-plugin/pr22721a.s: Likewise.
* testsuite/ld-plugin/pr22721b.c: Likewise.

(cherry picked from commit 8a1b824af786989f879ab1421a4279f60bba141a)

6 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Jan 2018 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoUpdate French translation in bfd sub-directory
Nick Clifton [Fri, 19 Jan 2018 10:48:21 +0000 (10:48 +0000)] 
Update French translation in bfd sub-directory

6 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Jan 2018 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agoPowerPC PLT stub alignment fixes
Alan Modra [Thu, 18 Jan 2018 11:36:40 +0000 (22:06 +1030)] 
PowerPC PLT stub alignment fixes

Asking for ppc32 plt call stubs to be aligned at 32 byte boundaries
didn't quite work.  For ld.bfd they were spaced 32 bytes apart, but
only started on a 16 byte boundary.  ld.gold also didn't get it right.

Finding that bug made me check over the ppc64 plt stub alignment,
where I found that negative values for alignment (meaning align to
minimize boundary crossing) were not accepted.  Since no one has
complained about that, I guess I could have removed the feature from
ld.bfd documentation, but I've opted instead to correct the code.

I've also added an optional alignment paramenter for ppc32
--plt-align, for some consistency with gold and ppc64 ld.bfd.

bfd/
* elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
* elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
(ppc64_elf_build_stubs): Likewise.
gold/
* powerpc.cc (param_plt_align): New function supplying default
--plt-align values.  Use it..
(Stub_table::plt_call_align): ..here, and..
(Output_data_glink::global_entry_align): ..here.
(Stub_table::stub_align): Correct 32-bit minimum alignment.
ld/
* emultempl/ppc32elf.em: Support optional --plt-align arg.
* emultempl/ppc64elf.em: Support negative --plt-align arg.

(cherry picked from commit 691d2e9af211ff8dd5fa8c96cb961b73a78394d7)

6 years agoPowerPC PLT speculative execution barriers
Alan Modra [Wed, 17 Jan 2018 03:49:08 +0000 (14:19 +1030)] 
PowerPC PLT speculative execution barriers

Spectre variant 2 mitigation for PowerPC and PowerPC64.

bfd/
* elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
(CRSETEQ, BEQCTRM): Define.
(is_nonpic_glink_stub): Don't check bctr.
(ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
(ppc_elf_relax_section): Size speculation barrier.
(output_bctr): New function.
(write_glink_stub): Use output_bctr.
(ppc_elf_relocate_section): Use output_bctr for long branch stub.
(ppc_elf_finish_dynamic_symbol): Likewise.
(ppc_elf_finish_dynamic_sections): Use output_bctr.
* elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
* elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
(GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
(size_global_entry_stubs): Handle speculation barrier sizing.
(plt_stub_size): Likewise.
(output_bctr): New function.
(build_plt_stub, build_tls_get_addr_stub): Output speculation
barrier.
(ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
(ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
(build_global_entry_stubs): Output speculation barrier.
(ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
* elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
gold/
* options.h (speculate_indirect_jumps): New option.
* powerpc.cc (beqctrm, beqctrlm, crseteq): New insn constants.
(output_bctr): New function.
(Stub_table::plt_call_size): Add space for speculation barrier.
(Stub_table::branch_stub_size): Likewise.
(Output_data_glink::pltresolve_size): Likewise.
(Stub_table::do_write): Output speculation barriers.
ld/
* emultempl/ppc32elf.em (params): Init new field.
(OPTION_SPECULATE_INDIRECT_JUMPS): Define.
(OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define.
(PARSE_AND_LIST_LONGOPTS): Handle new options.
(PARSE_AND_LIST_ARGS_CASES): Likewise.
(PARSE_AND_LIST_OPTIONS): Likewise.
* emultempl/ppc64elf.em (params): Init new field.
(OPTION_SPECULATE_INDIRECT_JUMPS): Define.
(OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define.
(PARSE_AND_LIST_LONGOPTS): Handle --speculate-indirect-jumps.
(PARSE_AND_LIST_OPTIONS): Likewise.
(PARSE_AND_LIST_ARGS_CASES): Likewise.
* ld.texinfo (--no-plt-thread-safe): Correct itemx.
(--speculate-indirect-jumps): Document.
* testsuite/ld-powerpc/elfv2exe.d,
* testsuite/ld-powerpc/elfv2so.d,
* testsuite/ld-powerpc/relbrlt.d,
* testsuite/ld-powerpc/powerpc.exp: Disable plt alignment and
speculation barriers on various tests.

(cherry picked from commit 1be5d8d3bbec4c9a112114993ac5c85b2b26c4c4)