]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
6 years agoImport patch from the mainline that fixes the ARM assembler's parsing of an illegal... users/ARM/embedded-binutils-2_30-branch-2018q2
Nick Clifton [Thu, 29 Mar 2018 11:31:04 +0000 (12:31 +0100)] 
Import patch from the mainline that fixes the ARM assembler's parsing of an illegal ORR instruction.

PR 22773
* config/tc-arm.c (md_apply_fix): Test Rn field of Thumb ORR
instruction before assuming that it is a MOV instruction.
* testsuite/gas/arm/pr22773.s: New test.
* testsuite/gas/arm/pr22773.d: New test driver.
* testsuite/gas/arm/pr22773.l: New expected output.

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

6 years agoFix case where IR file provides symbol visibility but replacement file does not.
Cary Coutant [Fri, 23 Mar 2018 16:03:34 +0000 (09:03 -0700)] 
Fix case where IR file provides symbol visibility but replacement file does not.

In PR 22868, two IR files provide conflicting visibility for a symbol.
When a def with PROTECTED visibility is seen after a def with DEFAULT
visibility, gold does not override the visibility. Later, if the
replacement object define the symbol with DEFAULT visibility, the symbol
remains DEFAULT. This was caused by a recent change to allow multiply-defined
absolute symbols, combined with the fact that the plugin framework was using
SHN_ABS as the section index for placeholder symbols. The solution is to
use a real (but arbitrary) section index.

gold/
PR gold/22868
* plugin.cc (Sized_pluginobj::do_add_symbols): Use a real section
index instead of SHN_ABS for defined symbols.
* testsuite/Makefile.am (plugin_pr22868): New test case.
* testsuite/Makefile.in: Regenerate
* testsuite/plugin_pr22868.sh: New test script.
* testsuite/plugin_pr22868_a.c: New source file.
* testsuite/plugin_pr22868_b.c: New source file.

6 years agoPR ld/22972 on SPARC.
Eric Botcazou [Wed, 28 Mar 2018 10:17:15 +0000 (12:17 +0200)] 
PR ld/22972 on SPARC.

This is a regression for the corner case of a hidden symbol in a PIC/PIE
binary which is subject to both a new-style GOTDATA relocation and an
old-style GOT relocation.  In this case, depending  on the link order,
the R_SPARC_RELATIVE dynamic relocation for the GOT slot needed because
of the old-style relocation can be replaced with R_SPARC_NONE coming
from the GOTDATA relocation.

The fix simply records whether an old-style GOT relocation is seen for a
symbol and prevents the R_SPARC_NONE from being generated in this case.

bfd/
* elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
has_old_style_got_reloc.
(_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
relocations.  Fix a couple of long lines.
(_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
a R_SPARC_NONE for the GOT slot if the symbol is also subject to
old-style GOT relocations.
ld/
* testsuite/ld-sparc/sparc.exp: Add test for mixed GOTDATA/GOT relocs.
* testsuite/ld-sparc/gotop-hidden.c: New file.
* testsuite/ld-sparc/got-hidden32.s: Likewise.
* testsuite/ld-sparc/got-hidden64.s: Likewise.
* testsuite/ld-sparc/pass.out: Likewise.

6 years agogold/testsuite: Fix bad regexp in split_x86_64.sh
Roland McGrath [Tue, 27 Mar 2018 23:27:03 +0000 (16:27 -0700)] 
gold/testsuite: Fix bad regexp in split_x86_64.sh

gold/
* testsuite/split_x86_64.sh: Fix bad regexp.

6 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 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, 27 Mar 2018 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

6 years agox86-64: Add ENDBR64 to the TLSDESC PLT entry
H.J. Lu [Mon, 26 Mar 2018 10:57:01 +0000 (03:57 -0700)] 
x86-64: Add ENDBR64 to the TLSDESC PLT entry

The TLSDESC entry in a lazy procedure linkage table is called indirectly
with "callq *(%rax)".  This patch adds an ENDBR64 to support indirect
branch tracking in Intel CET.  The TLSDESC PLT entry now looks like:

0xf3, 0x0f, 0x1e, 0xfa,  /* endbr64             */
0xff, 0x35, 8, 0, 0, 0,  /* pushq GOT+8(%rip)   */
0xff, 0x25, 16, 0, 0, 0  /* jmpq *GOT+TDG(%rip)  */

The BND prefix isn't needed since MPX isn't used for TLSDESC.

bfd/

PR ld/23000
* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
ENDBR64 to the TLSDESC PLT entry.

ld/

PR ld/23000
* testsuite/ld-x86-64/tlsdesc.pd: Updated.

(cherry picked from commit bf54968b128a2133174d81c438d402ecfaf83042)

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

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

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

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

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

6 years agoPowerPC64 debian bug 886264, out-of-line save/restore functions
Alan Modra [Wed, 14 Mar 2018 11:39:33 +0000 (22:09 +1030)] 
PowerPC64 debian bug 886264, out-of-line save/restore functions

This calculation in relocate_section

      if (stub_entry->stub_type == ppc_stub_save_res)
relocation += (stub_sec->output_offset
       + stub_sec->output_section->vma
       + stub_sec->size - htab->sfpr->size
       - htab->sfpr->output_offset
       - htab->sfpr->output_section->vma);

to adjust from the original out-of-line save/restore function address
in sfpr to a copy at the end of stub_sec goes wrong when stub_sec is
padded, because the copy is no longer at the end of stub_sec.  The
solution is to pad before copying sfpr, so the copy is always at the
end of stub_sec.

* elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
sfpr size added before defining alias symbols.
(ppc64_elf_build_stubs): Add stub section padding before
copying sfpr contents and defining save/restore alias symbols.

(cherry picked from commit 7dda8d3cf3b089bb7e03c4cdbec827fc6a188c88)

6 years agoReally remove unnecessary power9 group terminating nop
Alan Modra [Thu, 8 Mar 2018 04:04:09 +0000 (14:34 +1030)] 
Really remove unnecessary power9 group terminating nop

Oops, not tested well enough.  -mpower9 sets all the PPC_OPCODE_POWERn
for n <= 9.

* config/tc-ppc.c (ppc_handle_align): Correct last patch.  Really
don't emit a group terminating nop for power9.  Simplify cpu
tests.

(cherry picked from commit 6a7524c6aa18f5afa4977314eb01f0360e752789)

6 years agoRemove unnecessary power9 group terminating nop
Alan Modra [Wed, 7 Mar 2018 23:47:41 +0000 (10:17 +1030)] 
Remove unnecessary power9 group terminating nop

Power9 doesn't have a group terminating nop, so we may as well emit a
normal nop for power9.  Not that it matters a great deal, I believe
ori 2,2,0 will be treated exactly as ori 0,0,0 by the hardware.

* config/tc-ppc.c (ppc_handle_align): Don't emit a group
terminating nop for power9.

(cherry picked from commit 3fea0c3b3fe53ea805f1289ec9ff5e785024362f)

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

6 years agold/testsuite: XFAIL pr20995-2 on aarch64*-*-elf*
Roland McGrath [Tue, 20 Mar 2018 20:31:35 +0000 (13:31 -0700)] 
ld/testsuite: XFAIL pr20995-2 on aarch64*-*-elf*

ld/
* testsuite/ld-elf/elf.exp (pr20995-2): XFAIL on aarch64*-*-elf*,
another target without RELRO.

6 years agoSet non_ir_ref_dynamic if a symbol is made dynamic
H.J. Lu [Tue, 20 Mar 2018 10:51:26 +0000 (03:51 -0700)] 
Set non_ir_ref_dynamic if a symbol is made dynamic

If a symbol is made dynamic by --dynamic-list, it has non-IR reference.

bfd/

PR ld/22983
* elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.

ld/

PR ld/22983
* testsuite/ld-plugin/lto.exp: Run PR ld/22983 test.
* testsuite/ld-plugin/pr22983.d: New file.
* testsuite/ld-plugin/pr22983.t: Likewise.
* testsuite/ld-plugin/pr22983a.c: Likewise.
* testsuite/ld-plugin/pr22983b.c: Likewise.

(cherry picked from commit 416c34d683f2a17aefe19afb466af4316c7c603b)

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

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)