]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
8 years ago2017-06-21 Eric Christopher <echristo@gmail.com>
Eric Christopher [Mon, 15 May 2017 22:59:52 +0000 (15:59 -0700)] 
2017-06-21  Eric Christopher  <echristo@gmail.com>

        Apply from master
        2017-05-15  Eric Christopher <echristo@gmail.com>

        * layout.cc (Layout::segment_precedes): Add a case for testing
        pointer equality when determining which segment precedes
        another.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Jun 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years ago[ARM] Fix expansion of ldr pseudo instruction users/ARM/embedded-binutils-2_28-branch-2017q2
Thomas Preud'homme [Tue, 20 Jun 2017 10:28:15 +0000 (11:28 +0100)] 
[ARM] Fix expansion of ldr pseudo instruction

The LDR rX, =cst pseudo-instruction suffers from two issues for loading
integer constants in Thumb mode:

- movs is used if the constant and register can be encoded using that
  instruction which leads to unexpected behavior due to its flag-setting
  behavior
- mov.w, movw and mvn are used for r13 (sp) and r15 (pc) but these
  encoding are marked as UNPREDICTABLE

This patch fixes those issues and update testing accordingly.

2017-06-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>

Backport from mainline
2017-04-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
* config/tc-arm.c (move_or_literal_pool): Remove code generating MOVS.
Forbid MOV.W and MOVW if destination is SP or PC.
* testsuite/gas/arm/thumb2_ldr_immediate_highregs_armv6t2.s: Explain
expectation of LDR not generating a MOVS for low registers and small
constants.  Add tests of MOVW generation.
* testsuite/gas/arm/thumb2_ldr_immediate_highregs_armv6t2.d: Update
expected disassembly.

8 years agoMake import libraries relocatable objects
Thomas Preud'homme [Tue, 20 Jun 2017 10:21:49 +0000 (11:21 +0100)] 
Make import libraries relocatable objects

For ELF targets --out-implib currently generates an executable file
(e_type is ET_EXEC) despite the file being expected to be linked against
some other object file to make an executable later. It seems therefore
more sensible to make the import library a relocatable object file
(e_type set to ET_REL).

Incidentally, as dicted by requirement 8 of
"ARM v8-M Security Extensions: Requirements on Development Tools"
(document ARM-ECM-0359818) version 1.0, import libraries generated when
using --cmse-implib *must* be relocatable object file so this commit
also adds an assert there in case the type of ELF import library is
changed again in the future.

2017-06-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>

Backport from mainline
2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elflink.c (elf_output_implib): Remove executable flag from import
library bfd.
* elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
library is a relocatable object file.

gas/
* testsuite/ld-arm/arm-elf.exp
(Secure gateway import library generation): Check e_type field
of import library and executable produced.
* testsuite/ld-arm/cmse-implib.type: Expectations for e_type field.

8 years ago[GOLD] Avoid duplicate PLT stub symbols on ppc32
James Clarke [Tue, 20 Jun 2017 08:31:52 +0000 (18:01 +0930)] 
[GOLD] Avoid duplicate PLT stub symbols on ppc32

If two objects are compiled with -fPIC or -fPIE and call the same
function, two different PLT entries are created, one for each object,
but the same stub symbol name is used for both.

* powerpc.cc (Stub_table::define_stub_syms): Always include object's
uniq_ value.

8 years agoFix building riscv targets with gcc v6.3.1
Nick Clifton [Wed, 15 Mar 2017 09:19:42 +0000 (09:19 +0000)] 
Fix building riscv targets with gcc v6.3.1

* config/tc-riscv.c (riscv_pre_output_hook): Fix compile time
warning about discarding a const qualifier.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Jun 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Jun 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Jun 2017 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Jun 2017 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Jun 2017 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Jun 2017 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Jun 2017 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix handling of relocations against common symbols on AArch64.
James Clarke [Tue, 13 Jun 2017 14:55:02 +0000 (15:55 +0100)] 
Fix handling of relocations against common symbols on AArch64.

PR ld/19579
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
ELF_COMMON_DEF_P for common symbols.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Jun 2017 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Jun 2017 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Jun 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Jun 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Jun 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Jun 2017 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoImport a fix from upstream that allows the ARM ADR pseudo-instruction to work when...
Casey Smith [Wed, 7 Jun 2017 12:52:58 +0000 (13:52 +0100)] 
Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when generating a SUB instruction.

2017-05-30  Casey Smith  <clegg89@gmail.com>

PR ld/21523
* elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Jun 2017 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Jun 2017 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoPR21529, internal error in linker.c
Alan Modra [Mon, 5 Jun 2017 01:32:42 +0000 (11:02 +0930)] 
PR21529, internal error in linker.c

PR 21529
* linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Jun 2017 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Jun 2017 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoPR21503, Gold doesn't create linker stub symbols on ppc64
Alan Modra [Sat, 3 Jun 2017 03:37:21 +0000 (13:07 +0930)] 
PR21503, Gold doesn't create linker stub symbols on ppc64

PR 21503
* options.h: Add --emit-stub-syms option.
* powerpc.cc (object_id): New.
(Powerpc_relobj): Add uniq_ and accessor.  Sort variables for
better packing.
(Powerpc_dynobj): Sort variables for better packing.
(Target_powerpc::define_local): New function.
(Target_powerpc::group_sections): Pass stub table size to
Stub_table constructor.
(Target_powerpc::do_relax): Define stub and glink symbols.
(Stub_table): Add uniq_ variable, and id param to constructor.
(Stub_table::Plt_stub_ent): Add indx_ variable.
(Stub_table::Branch_stub_entries): Move typedef earlier.
(Stub_table::branch_stub_size): Replace "to" parameter with a
Branch_stub_entries iterator.
(Stub_table::add_long_branch_entry): Adjust to suit.
(Stub_table::add_plt_call_entry): Set indx_.
(Stub_table::define_stub_syms): New function.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Jun 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agox86: Remove linker option: -z prefix-nop
H.J. Lu [Fri, 2 Jun 2017 21:49:37 +0000 (14:49 -0700)] 
x86: Remove linker option: -z prefix-nop

Since it is incorrect to convert

bnd call *foo@GOTPCREL(%rip)

to

bnd nop
call foo

this patch removes the "-z prefix-nop" option from x86 linker.

* emulparams/call_nop.sh: Remove -z prefix-nop.
* ld.texinfo: Likewise.
* testsuite/ld-i386/call3c.d: Check for linker error.
* testsuite/ld-x86-64/call1c.d: Likewise.

(cherry picked from commit 4a4a4a27ba5c731044d3d3594545e6f06b0ec0e5)

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Jun 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Jun 2017 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoPowerPC64 ld help quoting
Alan Modra [Wed, 31 May 2017 08:40:01 +0000 (18:10 +0930)] 
PowerPC64 ld help quoting

* emultempl/ppc64elf.em (plt-static-chain help): Fix quoting.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 May 2017 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 May 2017 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 May 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 May 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 May 2017 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 May 2017 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 May 2017 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 May 2017 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 May 2017 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 May 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 May 2017 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 May 2017 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 May 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 May 2017 00:02:12 +0000 (00:02 +0000)] 
Automatic date update in version.in

8 years agoPowerPC: incorrect library search order
Alan Modra [Wed, 17 May 2017 23:38:55 +0000 (09:08 +0930)] 
PowerPC: incorrect library search order

First, need to match against just the CPU name, not the whole triplet.
Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
triplet.

Second, it should be testing for $target, not $host. Host may be
little endian by default, and the sysroot directory layout shouldn't
depend on whether it is built on LE or BE machine.

* emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Set from target
cpu, not host.

8 years agoFix compile time warning about pointer comparison.
Alan Modra [Wed, 17 May 2017 23:37:26 +0000 (09:07 +0930)] 
Fix compile time warning about pointer comparison.

PR 21034
* stabs.c (parse_stab_members): Fix thinko checking for g++
version 1 stabs information.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 May 2017 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 May 2017 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 May 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 May 2017 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix assertion failure relaxing TLS for position-independent executables.
James Clarke [Sat, 13 May 2017 15:01:15 +0000 (08:01 -0700)] 
Fix assertion failure relaxing TLS for position-independent executables.

gold/
PR gold/21444
* gold.cc (Target_sparc::Relocate::relocate_tls): Local
variables are final for position-independent executables. This
has to be consistent with Target_sparc::Scan::local otherwise
they will disagree as to whether local-exec is used.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 May 2017 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 May 2017 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix PR21404 - assertion fail when calculating symbol size
Senthil Kumar Selvaraj [Mon, 24 Apr 2017 09:47:14 +0000 (15:17 +0530)] 
Fix PR21404 - assertion fail when calculating symbol size

Fix a host of problems related to adjustment of
symbol values and sizes when relaxing for avr.

1. Adjust symbol size first before adjusting symbol
value. Otherwise, a symbol whose value just got adjusted to the
relaxed address also ends up getting resized. See pr21404-1.s.

2. Reduce symbol sizes only if their span is below an
alignment boundary. Otherwise, the size gets decremented once when the
actual instruction is relaxed and padding bytes are added, and again
when the padding bytes are deleted (if padding ends up being unnecessary).
pr21404-2.s addresses that, and this bug is really the root cause of PR21404.

3. Adjust all symbol values before an alignment boundary.
Previous code did not adjust symbol values if they fell in the
would-be padded area, resulting in incorrect symbol values in some
cases (see pr21404-3.s).

4. Increase symbol sizes if alignment directives require so.
As pr21404-4.s shows
.global nonzero_sym
L1:
    jmp  L1
nonzero_sym:
    nop
    nop
    .p2align 2
.size nonzero_sym, .-nonzero_sym

The two nops satisfy the 4 byte alignment at assembly time and
therefore the size of nonzero_sym is 4. Relaxation shortens
the 4 byte jmp to a 2 byte rjmp, and to satisfy 4 byte alignment
the code places 2 extra padding bytes after the nops, increasing
nonzero_sym's size by 2. This wasn't handled before.

If the assembly code does not have any align directives, then the
boundary is the section size, and symbol values and sizes == boundary
should also get adjusted. To handle that case, add a did_pad variable
and use that to determine whether it should use < boundary or <= boundary.

Also get rid of reloc_toaddr, which is now redundant.  toaddr is now not
adjusted to handle the above case - the newly added
did_pad variable does the job.

pr21404-{5,6,7,8} are the same testcases written for local symbols, as
the code handles them slightly differently.

bfd/ChangeLog
2017-05-01  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

PR ld/21404
* elf32-avr.c (avr_should_move_sym): New function.
(avr_should_reduce_sym_size): Likewise.
(avr_should_increase_sym_size): Likewise.
(elf32_avr_relax_delete_bytes): Adjust symbol values
and sizes by calling new functions.

ld/ChangeLog
2017-04-28  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

PR ld/21404
* testsuite/ld-avr/pr21404-1.d: New test.
* testsuite/ld-avr/pr21404-1.s: New test.
* testsuite/ld-avr/pr21404-2.d: New test.
* testsuite/ld-avr/pr21404-2.s: New test.
* testsuite/ld-avr/pr21404-3.d: New test.
* testsuite/ld-avr/pr21404-3.s: New test.
* testsuite/ld-avr/pr21404-4.d: New test.
* testsuite/ld-avr/pr21404-4.s: New test.
* testsuite/ld-avr/pr21404-5.d: New test.
* testsuite/ld-avr/pr21404-5.s: New test.
* testsuite/ld-avr/pr21404-6.d: New test.
* testsuite/ld-avr/pr21404-6.s: New test.
* testsuite/ld-avr/pr21404-7.d: New test.
* testsuite/ld-avr/pr21404-7.s: New test.
* testsuite/ld-avr/pr21404-8.d: New test.
* testsuite/ld-avr/pr21404-8.s: New test.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 May 2017 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 May 2017 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 May 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 May 2017 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 May 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 May 2017 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoRISC-V: Change CALL macro to use ra as the temporary address register
Michael Clark [Thu, 27 Apr 2017 04:08:46 +0000 (16:08 +1200)] 
RISC-V: Change CALL macro to use ra as the temporary address register

e.g.

    1:  auipc ra, %pcrel_hi(symbol)
        jalr  ra, %pcrel_lo(1b)(ra)

The use of ra instead of t1 for address construction provides an
opportunity for a microarchitecture to elide the write of the
destination address, and instead read the target address as an
immediate spread across the fused auipc+jalr pair. The link
register ra in the jalr overwrites the target address temporary.

8 years agoRISC-V: Allow 32-bit BFD to handle 64-bit objects
Palmer Dabbelt [Mon, 1 May 2017 17:26:32 +0000 (10:26 -0700)] 
RISC-V: Allow 32-bit BFD to handle 64-bit objects

We've been telling people that the riscv32-* and riscv64-* toolchains
are exactly the same, but it turns out we were lying: the riscv32-* BFD
doesn't handle 64-bit objects.  This fixes that difference, so the ports
are actually the same.

bfd/ChangeLog

2017-05-01  Palmer Dabbelt  <palmer@dabbelt.com>

        * config.bfd (riscv32-*): Enable rv64.

8 years agoRISC-V: Resurrect GP-relative disassembly hints
Palmer Dabbelt [Mon, 3 Apr 2017 17:08:29 +0000 (10:08 -0700)] 
RISC-V: Resurrect GP-relative disassembly hints

We missed a "_gp" when changing the GP symbol.  To make sure that
doesn't happen again, we now use the same definition everywhere (thanks,
Nick).

include/ChangeLog:

2017-04-03  Palmer Dabbelt  <palmer@dabbelt.com>

        * elf/riscv.h (RISCV_GP_SYMBOL): New define.

bfd/ChangeLog:

2017-04-03  Palmer Dabbelt  <palmer@dabbelt.com>

        * elfnn-riscv.c (GP_NAME): Delete.
        (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
        (_bfd_riscv_relax_lui): Likewise.

opcodes/ChangeLog:

2017-04-03  Palmer Dabbelt  <palmer@dabbelt.com>

        * riscv-dis.c (riscv_disassemble_insn): Change "_gp" to
        RISCV_GP_SYMBOL.

8 years agoRISC-V/bfd: Hook elf_backend_object_p to set the mach type.
Kuan-Lin Chen [Tue, 17 Jan 2017 01:46:28 +0000 (09:46 +0800)] 
RISC-V/bfd: Hook elf_backend_object_p to set the mach type.

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 May 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 May 2017 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 May 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 May 2017 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 May 2017 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 30 Apr 2017 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Apr 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Apr 2017 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Apr 2017 00:01:46 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoPR ld/21334: Always call `_bfd_elf_link_renumber_dynsyms' if required
Maciej W. Rozycki [Wed, 26 Apr 2017 21:23:44 +0000 (22:23 +0100)] 
PR ld/21334: Always call `_bfd_elf_link_renumber_dynsyms' if required

Complement commit e17b0c351f0b ("MIPS/BFD: Respect the ELF gABI dynamic
symbol table sort requirement") and correct an inconsistency in dynamic
symbol accounting data causing an assertion failure in the MIPS backend:

ld: BFD (GNU Binutils) 2.28.51.20170330 assertion fail
../../binutils-gdb/bfd/elfxx-mips.c:3860

in the course of making a GOT entry in a static binary to satisfy a GOT
relocation present in input, due to the local dynamic symbol count not
having been established.

To do so let backends request `_bfd_elf_link_renumber_dynsyms' to be
always called, rather than where a dynamic binary is linked only, and
then make this request in the MIPS backend.

bfd/
PR ld/21334
* elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
member.
* elfxx-target.h [!elf_backend_always_renumber_dynsyms]
(elf_backend_always_renumber_dynsyms): Define.
(elfNN_bed): Initialize `always_renumber_dynsyms' member.
* elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
* elflink.c (bfd_elf_size_dynsym_hash_dynstr): Also call
`_bfd_elf_link_renumber_dynsyms' if the backend has requested
it.
(elf_gc_sweep): Likewise.

(backported from commit 23ec1e32b1ab714649a7c25e49b5d721fe3bd3db)

8 years agoELF/BFD: Limit `_bfd_elf_link_renumber_dynsyms' call in section GC
Maciej W. Rozycki [Wed, 26 Apr 2017 21:18:13 +0000 (22:18 +0100)] 
ELF/BFD: Limit `_bfd_elf_link_renumber_dynsyms' call in section GC

Consistently call `_bfd_elf_link_renumber_dynsyms' only if linking a
dynamic binary, complementing code in `bfd_elf_size_dynsym_hash_dynstr'
and commit ccabcbe51e85 ("New attempt at fixing MIPS --gc-sections et
al."), <https://sourceware.org/ml/binutils/2005-08/msg00258.html>.

bfd/
* elflink.c (elf_gc_sweep): Only call
`_bfd_elf_link_renumber_dynsyms' if dynamic sections have been
created.

(backported from commit c46cec3a8cfe02fbe0f6c67ba53abc5369c5c659)

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Apr 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Apr 2017 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoi386: Set ELF_MAXPAGESIZE to 0x1000 for VxWorks
H.J. Lu [Mon, 24 Apr 2017 16:37:10 +0000 (09:37 -0700)] 
i386: Set ELF_MAXPAGESIZE to 0x1000 for VxWorks

commit a27e437177412e5b52999723f3c5d5d0d37b9087
Author: Roland McGrath <roland@gnu.org>
Date:   Thu Jul 28 22:35:15 2011 +0000

    BFD vector for elf32-i386-nacl:

changed ELF_MAXPAGESIZE to 0x10000 for VxWorks.  This patch fixes it
and updated testsuite/ld-i386/vxworks2.sd to add space for program
headers.

bfd/

PR ld/21425
* elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.

ld/

PR ld/20815
* testsuite/ld-i386/vxworks2.sd: Add space for program headers.

(cherry picked from commit 1587442d37ee4266e54d59bfdc783574f0587aff)

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Apr 2017 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Apr 2017 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Apr 2017 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Apr 2017 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Apr 2017 00:01:51 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix for PR ld/16044: elf32-cris.c h->plt.refcount inconsistency
Hans-Peter Nilsson [Wed, 19 Apr 2017 13:27:31 +0000 (15:27 +0200)] 
Fix for PR ld/16044: elf32-cris.c h->plt.refcount inconsistency

Backport (cherry-pick) from master.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Apr 2017 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 18 Apr 2017 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 17 Apr 2017 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 16 Apr 2017 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Apr 2017 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Apr 2017 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoMissing _bfd_error_handler args
Alan Modra [Thu, 13 Apr 2017 01:14:20 +0000 (10:44 +0930)] 
Missing _bfd_error_handler args

* elf32-arm.c (arm_type_of_stub): Supply missing args to "long
branch veneers" error.  Fix double space and format message.
* elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
* elf64-ppc.c (tocsave_find): Supply missing %B arg.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 13 Apr 2017 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Apr 2017 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 11 Apr 2017 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoELF: Check ELF_COMMON_DEF_P for common symbols
H.J. Lu [Fri, 7 Apr 2017 14:40:14 +0000 (07:40 -0700)] 
ELF: Check ELF_COMMON_DEF_P for common symbols

Since common symbols that are turned into definitions don't have the
DEF_REGULAR flag set, we need to check ELF_COMMON_DEF_P for common
symbols.

bfd/

PR ld/19579
PR ld/21306
* elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
ELF_COMMON_DEF_P for common symbols.
* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
* elflink.c (_bfd_elf_merge_symbol): Revert commits
202ac193bbbecc96a4978d1ac3d17148253f9b01 and
07492f668d2173da7a2bda3707ff0985e0f460b6.

ld/

PR ld/19579
PR ld/21306
* testsuite/ld-elf/pr19579a.c (main): Updated.

(cherry picked from commit 8170f7693bc0a9442c0aa280197925db92d48ca6)

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 10 Apr 2017 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 9 Apr 2017 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 8 Apr 2017 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in