]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
4 years agopowerpc64-ld infinite loop binutils-2_32-branch
Alan Modra [Wed, 11 Mar 2020 04:13:16 +0000 (14:43 +1030)] 
powerpc64-ld infinite loop

If this code dealing with possible conversion of inline plt sequences
is ever executed, ld will hang.  A binary with such sequences and of
code size larger than approximately 90% the reach of an unconditional
branch is the trigger.  Oops.

* elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.

(cherry picked from commit 435edf0bf231240ccecb474b74ebb49dc8db2633)

4 years agoReinstate gas em=freebsd for sparc-freebsd
Alan Modra [Wed, 15 Jan 2020 05:45:43 +0000 (16:15 +1030)] 
Reinstate gas em=freebsd for sparc-freebsd

In commit c9098af41e3 I over-simplified the sparc target decoding,
missing the fact that prior to that patch sparc-*-freebsd fell through
to the generic *-*-freebsd match.

* configure.tgt: Add sparc-*-freebsd case.

(cherry picked from commit c24d0e8d4850d4913a1630a53e272c930849406d)

4 years agoPR25384, PowerPC64 ELFv1 copy relocs against function symbols
Alan Modra [Tue, 14 Jan 2020 10:15:53 +0000 (20:45 +1030)] 
PR25384, PowerPC64 ELFv1 copy relocs against function symbols

Function symbols of course don't normally want .dynbss copies but
with some old versions of gcc they are needed to copy the function
descriptor.  This patch restricts the cases where they are useful to
compilers using dot-symbols, and enables the warning regardless of
whether a PLT entry is emitted in the executable.  PLTs in shared
libraries are affected by a .dynbss copy in the executable.

bfd/
PR 25384
* elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment.
(ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies
of function symbols unless dot symbols are present.  Do warn
whenever one is created, regardles of whether a PLT entry is
also emitted for the function symbol.
ld/
* testsuite/ld-powerpc/ambiguousv1b.d: Adjust expected output.
* testsuite/ld-powerpc/funref.s: Align func_tab.
* testsuite/ld-powerpc/funref2.s: Likewise.
* testsuite/ld-powerpc/funv1.s: Add dot symbols.

(cherry picked from commit e1c6cf618cbeebbafd34afc5ee921fcbf7061bfa)

4 years agoS/390: Add support for z15 as CPU name.
Andreas Krebbel [Tue, 8 Oct 2019 09:23:57 +0000 (11:23 +0200)] 
S/390: Add support for z15 as CPU name.

So far z15 was identified as arch13. After the machine has been
announced we can now add the real name.

gas/ChangeLog:

2019-12-17  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-10-08  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/tc-s390.c (s390_parse_cpu): Add z15 as alternate CPU
name.
* doc/as.texi: Add z15 to CPU string list.
* doc/c-s390.texi: Likewise.

opcodes/ChangeLog:

2019-12-17  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-10-08  Andreas Krebbel  <krebbel@linux.ibm.com>

* s390-mkopc.c (main): Enable z15 as CPU string in the opcode
table.

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Sep 2019 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Sep 2019 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Sep 2019 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Sep 2019 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Sep 2019 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Sep 2019 00:02:10 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Sep 2019 00:02:10 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Sep 2019 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Sep 2019 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoFix PR ld/24574
Eric Botcazou [Thu, 5 Sep 2019 16:23:37 +0000 (18:23 +0200)] 
Fix PR ld/24574

This restores a line that has been dropped when the auto-import feature
of the PE-COFF linker was overhauled about one year.  It is necessary
for GDB to properly resolve extern symbol in DLLs.

ld/ChangeLog
* pe-dll.c (pe_find_data_imports): Replace again the original name
of the undefined symbol with the __imp_ prefixed one after it is
resolved.

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Sep 2019 00:02:06 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Sep 2019 00:02:06 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Sep 2019 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Sep 2019 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Sep 2019 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 31 Aug 2019 00:02:13 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 30 Aug 2019 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 29 Aug 2019 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoCommit forgotten changelog
Tamar Christina [Wed, 28 Aug 2019 08:47:02 +0000 (09:47 +0100)] 
Commit forgotten changelog

4 years agoArm: Skip tests on WINCE that require mapping symbols
Tamar Christina [Fri, 9 Aug 2019 08:06:50 +0000 (09:06 +0100)] 
Arm: Skip tests on WINCE that require mapping symbols

The following tests fail on wince as they rely on mapping symbols to
give them a fixed order.

This skips them on platforms that don't have mapping symbols.

binutils/ChangeLog:

* testsuite/binutils-all/arm/in-order-all.d: Skip on pe, wince, coff.
* testsuite/binutils-all/arm/in-order.d: Likewise.
* testsuite/binutils-all/arm/out-of-order-all.d: Likewise.
* testsuite/binutils-all/arm/out-of-order.d: Likewise.

(cherry picked from commit 2b2ed2452c0bd2437ff65e71356bece225f0be46)

4 years agoArm: Fix performance issue with thumb-2 tailcalls
Tamar Christina [Tue, 20 Aug 2019 15:34:26 +0000 (16:34 +0100)] 
Arm: Fix performance issue with thumb-2 tailcalls

We currently use a padding NOP after a Thumb to Arm interworking veneer (BX pc).
The NOP is never executed but may result in a performance penalty on some cores.

For this reason this patch changes the NOPs after Thumb to Arm veneers into B .-2
and adds a note to this in the source code for future reference.

bfd/ChangeLog:

* elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
elf32_arm_stub_long_branch_v4t_thumb_thumb,
elf32_arm_stub_long_branch_v4t_thumb_arm,
elf32_arm_stub_short_branch_v4t_thumb_arm,
elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
previous instruction.

ld/ChangeLog:

* testsuite/ld-arm/cortex-a8-fix-b-plt.d: Update Testcase.
* testsuite/ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise.
* testsuite/ld-arm/cortex-a8-fix-bcc-plt.d: Likewise.
* testsuite/ld-arm/farcall-cond-thumb-arm.d: Likewise.
* testsuite/ld-arm/farcall-mixed-app.d: Likewise.
* testsuite/ld-arm/farcall-mixed-app2.d: Likewise.
* testsuite/ld-arm/farcall-mixed-lib-v4t.d: Likewise.
* testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d: Likewise.
* testsuite/ld-arm/farcall-thumb-arm-short.d: Likewise.
* testsuite/ld-arm/farcall-thumb-arm.d: Likewise.
* testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
* testsuite/ld-arm/farcall-thumb-thumb.d: Likewise.
* testsuite/ld-arm/fix-arm1176-on.d: Likewise.
* testsuite/ld-arm/ifunc-10.dd: Likewise.
* testsuite/ld-arm/ifunc-2.dd: Likewise.
* testsuite/ld-arm/ifunc-4.dd: Likewise.
* testsuite/ld-arm/ifunc-6.dd: Likewise.
* testsuite/ld-arm/ifunc-8.dd: Likewise.
* testsuite/ld-arm/jump-reloc-veneers-long.d: Likewise.
* testsuite/ld-arm/mixed-app.d: Likewise.
* testsuite/ld-arm/thumb2-b-interwork.d: Likewise.
* testsuite/ld-arm/tls-longplt.d: Likewise.
* testsuite/ld-arm/tls-thumb1.d: Likewise.

(cherry picked from commit b4e87f2c1eee99dee805e3828514f8afa162f9ba)

4 years agoAArch64: Fix LD crash on weak and undefined TLS symbols. (PR/24602).
Tamar Christina [Thu, 22 Aug 2019 10:35:35 +0000 (11:35 +0100)] 
AArch64: Fix LD crash on weak and undefined TLS symbols. (PR/24602).

This patch fixes a few linker crashes due to TLS code reaching an assert when it
shouldn't.

The first scenario is with weak TLS symbols that remain weak during linking.  In
this case the mid-end would not have seen a TLS symbol and so wouldn't have
allocated the TLS section.  We currently assert here and the linker crashes with
a not very useful message.

This patch changes this to return the value 0 for the TLS symbol in question
emulating what lld and gold and other BFD targets do.  However because weak TLS
is implementation defined and we don't define any behavior for it I also emit a
warning to the user to inform them of such.

Secondly when a strong TLS reference is undefined. The linker crashes even after
it correctly reported that there is an undefined reference.  This changes it so
that it gracefully exits and reports a useful error.

bfd/ChangeLog:

PR ld/24601
* elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
* elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
for weak TLS.

ld/ChangeLog:

PR ld/24601
* testsuite/ld-aarch64/aarch64-elf.exp (undef-tls, weak-tls): New.
* testsuite/ld-aarch64/undef-tls.d: New test.
* testsuite/ld-aarch64/undef-tls.s: New test.
* testsuite/ld-aarch64/weak-tls.d: New test.
* testsuite/ld-aarch64/weak-tls.s: New test.

(cherry picked from commit 652afeef247770b22c44ca292d1f4c65be40a696)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Aug 2019 00:01:56 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 27 Aug 2019 00:01:59 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Aug 2019 00:02:07 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Aug 2019 00:02:52 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Aug 2019 00:02:10 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Aug 2019 00:02:16 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years ago[AArch64][gas] Update MTE system register encodings
Kyrylo Tkachov [Thu, 22 Aug 2019 09:23:58 +0000 (10:23 +0100)] 
[AArch64][gas] Update MTE system register encodings

Backport from mainline
2019-08-22  Kyrylo Tkachov <kyrylo.tkachov@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Update encoding of tfsre0_el1,
tfsr_el1, tfsr_el2, tfsr_el3, tfsr_el12.
(aarch64_sys_reg_supported_p): Update checks for the above.

Backport from mainline
2019-08-22  Kyrylo Tkachov <kyrylo.tkachov@arm.com>

* testsuite/gas/aarch64/sysreg-4.d: Update expected disassembly for
tfsre0_el1, tfsr_el1, tfsr_el2, tfsr_el3, tfsr_el12 system registers.

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Aug 2019 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Aug 2019 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Aug 2019 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Aug 2019 00:02:29 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Aug 2019 00:02:45 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoPR24911, Heap overflow issue in qsort_r, dwarf.c
Alan Modra [Sat, 17 Aug 2019 08:31:05 +0000 (18:01 +0930)] 
PR24911, Heap overflow issue in qsort_r, dwarf.c

The actual args to this function are "pointers to pointers to
debug_info".

PR 24911
* dwarf.c (comp_addr_base): Dereference args.

(cherry picked from commit d367307b93e5589245d1f2c8bbcfe709404540a8)

4 years agoPR24909, Uninitialized use on stack in readelf
Alan Modra [Fri, 16 Aug 2019 05:47:23 +0000 (15:17 +0930)] 
PR24909, Uninitialized use on stack in readelf

PR 24909
PR 23499
* readelf.c (get_symbol_version_string): Set sym_info earlier.

(cherry picked from commit 0b8b76098ff3d3dcd0c621f2e45cc0b4e7211d6a)

4 years agoPowerPC gcc bootstrap fail with bss-plt
Alan Modra [Fri, 16 Aug 2019 03:50:28 +0000 (13:20 +0930)] 
PowerPC gcc bootstrap fail with bss-plt

git commit 3e04d7655b introduced a bug by sizing output sections
earlier in ppc_before_allocation.  That meant PLT (and GOT) sizes were
not included when calculating total executable section sizes.

* emultempl/ppc32elf.em (ppc_before_allocation): Force running
prelim_size_sections before deciding whether branch trampolines
might be needed.

(cherry picked from commit 7df6aecc97b96843da080d54414052b1c954ddca)

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Aug 2019 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Aug 2019 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Aug 2019 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Aug 2019 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Aug 2019 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Aug 2019 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Aug 2019 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Aug 2019 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Aug 2019 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Aug 2019 00:02:18 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Aug 2019 00:02:50 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Aug 2019 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Aug 2019 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Aug 2019 00:01:59 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Aug 2019 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoPR23940, check bounds before using
Wu Heng [Fri, 25 Jan 2019 03:11:47 +0000 (13:41 +1030)] 
PR23940, check bounds before using

PR gas/23940
* macro.c (getstring): Check array bound before accessing.

(cherry picked from commit 10c172ba93dde7cb7c46982ca217e646565bf938)

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Aug 2019 00:02:11 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Aug 2019 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Jul 2019 00:02:17 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Jul 2019 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Jul 2019 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Jul 2019 00:02:49 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Jul 2019 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Jul 2019 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years ago[ARM]: Correct the regular expressions in cmse_main_sec_debug.d file.
Srinath Parvathaneni [Mon, 22 Jul 2019 13:46:11 +0000 (14:46 +0100)] 
[ARM]: Correct the regular expressions in cmse_main_sec_debug.d file.

Fixes the linker testcase "Secure gateway veneers:cmse functions debug
information missing" which was failing due to output regular expression
mismatch on arm-none-linux-gnueabihf targets.

* ld/testsuite/ld-arm/cmse_main_sec_debug.d: Modify regexps to
allow for output from a arm-none-linux-gnueabihf target.

(cherry picked from commit 0c628bba5afd16e0ab3d78ca81ab3f2d5342c50c)

Committed on behalf of Srinath Parvathaneni.

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Jul 2019 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years ago[AArch64] Add support for GMID_EL1 register for +memtag
Kyrylo Tkachov [Wed, 24 Jul 2019 11:27:35 +0000 (12:27 +0100)] 
[AArch64] Add support for GMID_EL1 register for +memtag

We're missing support for the GMID_EL1 system register from the Memory Tagging Extension in binutils.
This is specified at:
https://developer.arm.com/docs/ddi0595/latest/aarch64-system-registers/gmid_el1

This simple patch adds the support for this read-only register.
Tested make check on gas.

Backport from mainline
2019-07-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add gmid_el1 entry.
(aarch64_sys_reg_supported_p): Handle gmid_el1 encoding.

Backport from mainline
2019-07-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* testsuite/gas/aarch64/sysreg-4.s: Test gmid_el1 read.
* testsuite/gas/aarch64/sysreg-4.d: Update expected output.
* testsuite/gas/aarch64/illegal-sysreg-4.l: Likewise.

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Jul 2019 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Jul 2019 00:02:40 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Jul 2019 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Jul 2019 00:02:00 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Jul 2019 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Jul 2019 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Jul 2019 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Jul 2019 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Jul 2019 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Jul 2019 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Jul 2019 00:01:58 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Jul 2019 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Jul 2019 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Jul 2019 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Jul 2019 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Jul 2019 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoaarch64: fix DT_AARCH64_VARIANT_PCS handling in readelf
Szabolcs Nagy [Mon, 8 Jul 2019 12:57:43 +0000 (13:57 +0100)] 
aarch64: fix DT_AARCH64_VARIANT_PCS handling in readelf

backport commit 13acf03468d1e218c0a980ff6e6adaaac4bb5d1e
failed to copy the changes in get_dynamic_type.

this could cause build failure

binutils/readelf.c:1800:1: warning: 'get_aarch64_dynamic_type' defined but not used [-Wunused-function]

binutils/ChangeLog:

2019-07-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>

* readelf.c (get_dynamic_type): Handle EM_AARCH64.

4 years agoPR24785, bfd crashes on empty .PPC.EMB.apuinfo section
Alan Modra [Mon, 8 Jul 2019 00:36:09 +0000 (10:06 +0930)] 
PR24785, bfd crashes on empty .PPC.EMB.apuinfo section

PR 24785
* elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
size before reading first word.

(cherry picked from commit 62a47958bd6e3cbd909c2f19cd4669a9670ce4f1)

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

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Jul 2019 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Jul 2019 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoaarch64: handle STO_AARCH64_VARIANT_PCS in bfd
Szabolcs Nagy [Thu, 25 Apr 2019 14:07:14 +0000 (15:07 +0100)] 
aarch64: handle STO_AARCH64_VARIANT_PCS in bfd

Backport commit 823710d5856996d1f54f04ecb2f7647aeae99b5b
Backport commit 65f381e729bedb933f3e1376e7f53f0ff63ac9a8

Propagate STO_AARCH64_VARIANT_PCS st_other attribute to the output and
add DT_AARCH64_VARIANT_PCS dynamic tag if necessary.

Mismatching attributes are not diagnosed.

bfd/ChangeLog:

* elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
(struct elf_aarch64_link_hash_table): Add variant_pcs member.
(elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
(elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
(elf_backend_merge_symbol_attribute): Define.

ld/ChangeLog:

* testsuite/ld-aarch64/aarch64-elf.exp: Add new tests.
* testsuite/ld-aarch64/variant_pcs-1.s: New asm for tests.
* testsuite/ld-aarch64/variant_pcs-2.s: New asm for tests.
* testsuite/ld-aarch64/variant_pcs-now.d: New test.
* testsuite/ld-aarch64/variant_pcs-r.d: New test.
* testsuite/ld-aarch64/variant_pcs-shared.d: New test.
* testsuite/ld-aarch64/variant_pcs.ld: New linker script for tests.

ld/ChangeLog:

* testsuite/ld-aarch64/variant_pcs-now.d: Use --hash-style=sysv.
* testsuite/ld-aarch64/variant_pcs-shared.d: Likewise.

4 years agoaarch64: override default elf .set handling in gas
Szabolcs Nagy [Thu, 25 Apr 2019 14:07:10 +0000 (15:07 +0100)] 
aarch64: override default elf .set handling in gas

Backport commit 0b4eac57c44ec4c9e13f5201b40936c3b3e6c639

Allow st_other values such as STO_AARCH64_VARIANT_PCS to be set for alias
symbols independently.  This is needed for ifunc symbols which are
aliased to the resolver using .set and don't expect resolver attributes
to override the ifunc symbol attributes.  This means .variant_pcs must be
added explicitly to aliases.

gas/ChangeLog:

* config/tc-aarch64.c (aarch64_elf_copy_symbol_attributes): Define.
* config/tc-aarch64.h (aarch64_elf_copy_symbol_attributes): Declare.
(OBJ_COPY_SYMBOL_ATTRIBUTES): Define.
* testsuite/gas/aarch64/symbol-variant_pcs-3.d: New test.
* testsuite/gas/aarch64/symbol-variant_pcs-3.s: New test.

4 years agoaarch64: handle .variant_pcs directive in gas
Szabolcs Nagy [Thu, 25 Apr 2019 14:06:53 +0000 (15:06 +0100)] 
aarch64: handle .variant_pcs directive in gas

Backport commit f166ae0188dcb89c5ae925034260a708a254ab2f

In ELF objects the specified symbol is marked with STO_AARCH64_VARIANT_PCS.

gas/ChangeLog:

* config/tc-aarch64.c (s_variant_pcs): New function.
* doc/c-aarch64.texi: Document .variant_pcs.
* testsuite/gas/aarch64/symbol-variant_pcs-1.d: New test.
* testsuite/gas/aarch64/symbol-variant_pcs-1.s: New test.
* testsuite/gas/aarch64/symbol-variant_pcs-2.d: New test.
* testsuite/gas/aarch64/symbol-variant_pcs-2.s: New test.

4 years agoaarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS
Szabolcs Nagy [Thu, 25 Apr 2019 12:46:01 +0000 (13:46 +0100)] 
aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS

Backport commit 2301ed1c9af1316b4bad3747d2b03f7d44940f87

The bottom 2 bits of st_other are used for visibility, the top 6 bits are
de facto reserved for processor specific use.  This patch defines a
bits to mark function symbols that follow a variant procedure call standard
with different register usage convention.

A dynamic tag is also defined that marks modules with R_<CLS>_JUMP_SLOT
relocations referencing symbols marked with STO_AARCH64_VARIANT_PCS.
This can be used by dynamic linkers that support lazy binding to decide
what registers need to be preserved during symbol resolution.

binutils/ChangeLog:

* readelf.c (get_aarch64_dynamic_type): Handle DT_AARCH64_VARIANT_PCS.
(get_aarch64_symbol_other): New, handles STO_AARCH64_VARIANT_PCS.
(get_symbol_other): Call get_aarch64_symbol_other.

include/ChangeLog:

* elf/aarch64.h (DT_AARCH64_VARIANT_PCS): Define.
(STO_AARCH64_VARIANT_PCS): Define.

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Jul 2019 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Jul 2019 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Jul 2019 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoEnsure that debug information for ARM security functions is not dropped by the linker...
Srinath Parvathaneni [Tue, 2 Jul 2019 13:48:40 +0000 (14:48 +0100)] 
Ensure that debug information for ARM security functions is not dropped by the linker when performing garbage collection.

onsider a file containing only Armv8-M secure entry functions.
This file is compiled and linked with "-march=armv8-m.main -mfloat-abi=hard
-mfpu=fpv5-sp-d16 -mcmse -static --specs=rdimon.specs
-Wl,--section-start,.gnu.sgstubs=0x190000 -ffunction-sections
-fdata-sections
-Wl,--gc-sections -g" options to generate an executable.

The executable generated does not contain any debug information of these
secure entry
functions even though it contains secure entry functions in the .text
section.

Example:
$ cat main.c
int main (void)
{
    return 0;
}

$ cat sec.c
void __attribute__((cmse_nonsecure_entry))
SecureLED_On ()
{
}

Generate the object files "main.o" and "sec.o" for above test, using
below command.

1. $ arm-none-eabi-gcc -march=armv8-m.main -mfloat-abi=hard
-mfpu=fpv5-sp-d16 -mcmse
-static --specs=rdimon.specs -ffunction-sections -fdata-sections main.c
sec.c -g -c

Using linker, generate the executable for above generated object files.

2.$ arm-none-eabi-ld --section-start .gnu.sgstubs=0x190000 --gc-sections
main.o sec.o -e0 -o main_sec.out

Check for "SecureLED_On" in dwarf information generated for executable
"main_sec.out".

3. $ arm-none-eabi-objdump --dwarf=info main_sec.out |grep "SecureLED_On"

There is no match for the function "SecureLED_On" in .dwarf_info.

After applying this patch and performing above steps 2 and 3, the output is:
       <8f>   DW_AT_name        : (indirect string, offset: 0x9d):
SecureLED_On

This patch fixes the linker by marking all the debug sections (setting
gc_mark to 1)
when .text section containing secure entry functions is marked.

bfd * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
sections when .text section contain secure entry functions
is marked.

ld * testsuite/ld-arm/arm-elf.exp: Add tests.
* testsuite/ld-arm/cmse_main.s: New test.
* testsuite/ld-arm/cmse_main_sec_debug.d: Likewise.
* testsuite/ld-arm/cmse_sec_debug.s: Likewise.

4 years ago[AArch64] Allow MOVPRFX to be used with FMOV
Richard Sandiford [Tue, 2 Jul 2019 10:03:31 +0000 (11:03 +0100)] 
[AArch64] Allow MOVPRFX to be used with FMOV

The entry for the FMOV alias of FCPY was missing C_SCAN_MOVPRFX.
(The entry for FCPY itself was OK.)

This was the only /m-predicated instruction I could see that was
missing the flag.

2019-07-02  Richard Sandiford  <richard.sandiford@arm.com>

opcodes/
* aarch64-tbl.h (aarch64_opcode): Set C_SCAN_MOVPRFX for the
SVE FMOV alias of FCPY.

gas/
* testsuite/gas/aarch64/sve-movprfx_27.s,
* testsuite/gas/aarch64/sve-movprfx_27.d: New test.

4 years ago[AArch64] Add missing C_MAX_ELEM flags for SVE conversions
Richard Sandiford [Tue, 2 Jul 2019 10:03:27 +0000 (11:03 +0100)] 
[AArch64] Add missing C_MAX_ELEM flags for SVE conversions

SVE FCVTZS, FCVTZU, SCVTF and UCVTF need the same treatment as FCVT:
the register size used in a predicated MOVPRFX must be the wider of
the destination and source sizes.

Since I was adding a (supposedly) complete set of tests for converts,
it seemed more consistent to add a complete set of tests for shifts
as well, even though there's no bug to fix there.

2019-07-02  Richard Sandiford  <richard.sandiford@arm.com>

opcodes/
* aarch64-tbl.h (aarch64_opcode_table): Add C_MAX_ELEM flags
to SVE fcvtzs, fcvtzu, scvtf and ucvtf entries.

gas/
* testsuite/gas/aarch64/sve-movprfx_26.s: Also test FCVTZS, FCVTZU,
SCVTF, UCVTF, LSR and ASR.
* testsuite/gas/aarch64/sve-movprfx_26.d: Update accordingly.
* testsuite/gas/aarch64/sve-movprfx_26.l: Likewise.

4 years ago[AArch64] Fix bogus MOVPRFX warning for GPR form of CPY
Richard Sandiford [Tue, 2 Jul 2019 10:03:22 +0000 (11:03 +0100)] 
[AArch64] Fix bogus MOVPRFX warning for GPR form of CPY

One of the MOVPRFX tests has:

  output register of preceding `movprfx' used as input at operand 3 -- `cpy z1.d,p1/m,x1'

But X1 and Z1 are not the same register, so the instruction is
actually OK.

2019-07-02  Richard Sandiford  <richard.sandiford@arm.com>

opcodes/
* aarch64-opc.c (verify_constraints): Skip GPRs when scanning the
registers in an instruction prefixed by MOVPRFX.

gas/
* testsuite/gas/aarch64/sve-movprfx_25.s: Allow CPY Z1.D.P1/M,X1
to be prefixed by MOVPRFX.
* testsuite/gas/aarch64/sve-movprfx_25.d: Update accordingly.
* testsuite/gas/aarch64/sve-movprfx_25.l: Likewise.