]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
4 years agoPowerPC TPREL_HA/LO optimisation
Alan Modra [Mon, 24 Aug 2020 07:02:57 +0000 (16:32 +0930)] 
PowerPC TPREL_HA/LO optimisation

ppc64 ld optimises sequences like the following
addis 3,13,wot@tprel@ha
lwz 3,wot@tprel@l(3)
to
nop
lwz 3,wot@tprel(13)
when "wot" is located near enough to the thread pointer.
However, the ABI doesn't require that R_PPC64_TPREL16_HA always be on
an addis rt,13,imm instruction, and while ld checked for that on the
high-part instruction it didn't disable the optimisation on the
low-part instruction.  This patch fixes that problem, disabling the
tprel optimisation globally if high-part instructions don't pass
sanity checks.  The optimisation is also enabled for ppc32, where
before ld.bfd had the code in the wrong place and ld.gold had it in a
block only enabled for ppc64.

bfd/
* elf32-ppc.c (ppc_elf_check_relocs): Set has_tls_reloc for
high part tprel16 relocs.
(ppc_elf_tls_optimize): Sanity check high part tprel16 relocs.
Clear do_tls_opt on odd instructions.
(ppc_elf_relocate_section): Move TPREL16_HA/LO optimisation later.
Don't sanity check them here.
* elf64-ppc.c (ppc64_elf_check_relocs): Set has_tls_reloc for
high part tprel16 relocs.
(ppc64_elf_tls_optimize): Sanity check high part tprel16 relocs.
Clear do_tls_opt on odd instructions.
(ppc64_elf_relocate_section): Don't sanity check TPREL16_HA.
ld/
* testsuite/ld-powerpc/tls32.d: Update for TPREL_HA/LO optimisation.
* testsuite/ld-powerpc/tlsexe32.d: Likewise.
* testsuite/ld-powerpc/tlsldopt32.d: Likewise.
* testsuite/ld-powerpc/tlsmark32.d: Likewise.
* testsuite/ld-powerpc/tlsopt4_32.d: Likewise.
* testsuite/ld-powerpc/tprel.s,
* testsuite/ld-powerpc/tprel.d,
* testsuite/ld-powerpc/tprel32.d: New tests.
* testsuite/ld-powerpc/tprelbad.s,
* testsuite/ld-powerpc/tprelbad.d: New test.
* testsuite/ld-powerpc/powerpc.exp: Run them.
gold/
* powerpc.cc (Target_powerpc): Add tprel_opt_ and accessors.
(Target_powerpc::Scan::local): Sanity check tprel high relocs.
(Target_powerpc::Scan::global): Likewise.
(Target_powerpc::Relocate::relocate): Control tprel optimisation
with tprel_opt_ and enable for 32-bit.

(cherry picked from commit 252dcdf432c67f6baafb766ed068c64db1eb2bad)

4 years agoDate update
Alan Modra [Thu, 10 Sep 2020 07:08:24 +0000 (16:38 +0930)] 
Date update

4 years agoaarch64: set sh_entsize of .plt to 0
Szabolcs Nagy [Wed, 29 Jul 2020 14:47:50 +0000 (15:47 +0100)] 
aarch64: set sh_entsize of .plt to 0

On aarch64 the first PLT entry is 32 bytes, subsequent entries
are 16 bytes by default but can be 24 bytes with BTI or with
PAC-PLT.

sh_entsize of .plt was set to the PLT entry size, so in some
cases sh_size % sh_entsize != 0, which breaks some tools.

Note that PLT0 (and the TLSDESC stub code which is also in the
PLT) were historically not padded up to meet the sh_size
requirement, but to ensure that PLT stub code is aligned on
cache lines. Similar layout is present on other targets too
which just happens to make sh_size a multiple of sh_entsize and
it is not expected that sh_entsize of .plt is used for anything.

This patch sets sh_entsize of .plt to 0: the section does not
hold a table of fixed-size entries so other values are not
conforming in principle to the ELF spec.

bfd/ChangeLog:

Backport from mainline.
2020-07-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>

PR ld/26312
* elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set sh_entsize
to 0.
(elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting.

(cherry picked from commit 4d3bb35620e70d543d438bf21be1307f7ea0f5d0)

5 years agoS/390: z13: Accept vector alignment hints
Stefan Schulze Frielinghaus [Mon, 18 May 2020 15:22:57 +0000 (17:22 +0200)] 
S/390: z13: Accept vector alignment hints

Accept vector alignment hints on z13 although they are ignored there.
The advantage is that any binary compiled for architecture level z13 may
run on z14 or later and benefit from vector alignment hints.

Backport from mainline.

gas/ChangeLog:

2020-05-18  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>

* testsuite/gas/s390/zarch-z13.d: Add regexp checks for vector
load/store instruction variants with alignment hints.
* testsuite/gas/s390/zarch-z13.s: Emit new vector load/store
instruction variants with alignment hints.

opcodes/ChangeLog:

2020-05-18  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>

* s390-opc.txt: Relocate vector load/store instructions with
additional alignment parameter and change architecture level
constraint from z14 to z13.

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Jul 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Jul 2020 00:00:19 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Jul 2020 00:00:22 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Jul 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Jun 2020 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Jun 2020 00:00:20 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Jun 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Jun 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Jun 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Jun 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Jun 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Jun 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Jun 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Jun 2020 00:00:19 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Jun 2020 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Jun 2020 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Jun 2020 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Jun 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Jun 2020 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Jun 2020 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Jun 2020 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Jun 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Jun 2020 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Jun 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agogas: Fix checking for backwards .org with negative offset
Alex Coplan [Fri, 29 May 2020 15:04:50 +0000 (16:04 +0100)] 
gas: Fix checking for backwards .org with negative offset

This patch fixes internal errors in (at least) arm and aarch64 GAS
when assembling code that attempts a negative .org.  The bug appears
to be a regression introduced in binutils-2.29 by commit 9875b36538d.

* write.c (relax_segment): Fix handling of negative offset when
relaxing an rs_org frag.
* testsuite/gas/aarch64/org-neg.d: New test.
* testsuite/gas/aarch64/org-neg.l: Error output for test.
* testsuite/gas/aarch64/org-neg.s: Input for test.
* testsuite/gas/arm/org-neg.d: New test.
* testsuite/gas/arm/org-neg.l: Error output for test.
* testsuite/gas/arm/org-neg.s: Input for test.

(cherry picked from commit c39c821c1da3e8a64eff5984a39e104eb798e8b8)

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Jun 2020 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Jun 2020 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Jun 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Jun 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Jun 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Jun 2020 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoPrevent a potential use-after-fee memory corruption bug in the linker (for PE format...
Nick Clifton [Wed, 3 Jun 2020 14:16:48 +0000 (15:16 +0100)] 
Prevent a potential use-after-fee memory corruption bug in the linker (for PE format files).

PR 25993
* emultempl/pe.em (_after_open): Check for duplicate filename
pointers before renaming the dll.
* emultempl/pep.em (_after_open): Likewise.

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Jun 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Jun 2020 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Jun 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 31 May 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 May 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 May 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 May 2020 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 May 2020 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 26 May 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 25 May 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 May 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 23 May 2020 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 22 May 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 21 May 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoFix the ARM assembler to generate a Realtime profile for armv8-r.
Alexander Fedotov [Wed, 20 May 2020 10:46:54 +0000 (11:46 +0100)] 
Fix the ARM assembler to generate a Realtime profile for armv8-r.

            PR 25992
    gas     * config/tc-arm.c : Add arm_ext_v8r feature.
            (it_fsm_post_encode): Check arm_ext_v8r feature.
            (get_aeabi_cpu_arch_from_fset): Check arm_ext_v8r feature.

    include * opcode/arm.h (ARM_EXT2_V8R): Define. Modified ARM_AEXT2_V8R.

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 20 May 2020 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 19 May 2020 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoRe: Fix tight loop on recursively-defined symbols
Alan Modra [Mon, 18 May 2020 04:00:59 +0000 (13:30 +0930)] 
Re: Fix tight loop on recursively-defined symbols

sy_resolving ought to not be set for a struct local_symbol, but it is
apparent from local_symbol_make that the field is not initialised.

* symbols.c (resolve_symbol_value): Invoke LOCAL_SYMBOL_CHECK
before looking at add_symbol->sy_flags.sy_resolving.

(cherry picked from commit d402189f2faa0aaa9fb8ad4669fdf0059946cd8a)

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 18 May 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 17 May 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 16 May 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoFix tight loop on recursively-defined symbols
Alan Modra [Fri, 15 May 2020 08:36:05 +0000 (18:06 +0930)] 
Fix tight loop on recursively-defined symbols

This patch fixes a bug in GAS where the assembler enters a tight loop
when attempting to resolve recursively-defined symbols, e.g. when
trying to assemble "a=a".

This is a regression introduced between binutils 2.32 and 2.33,
by commit 1903f1385bff9

* symbols.c (struct local_symbol): Update comment.
(resolve_symbol_value): For resolved symbols equated to other
symbols, verify that the referenced symbol is not a local_symbol
before accessing sy_value.  Don't leave symbol loops during
finalize_syms resolution.
* testsuite/gas/all/assign-bad-recursive.d: New test.
* testsuite/gas/all/assign-bad-recursive.l: Error output for test.
* testsuite/gas/all/assign-bad-recursive.s: Assembly for test.
* testsuite/gas/all/gas.exp: Run it.

(cherry picked from commit 2a50b401465f74d7f3ee1654915b9070b4dc0fee)

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 15 May 2020 00:00:18 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 14 May 2020 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 13 May 2020 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 12 May 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 11 May 2020 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 10 May 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 9 May 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

5 years agogas: PR 25863: Fix scalar vmul inside it block when assembling for MVE
Andre Simoes Dias Vieira [Mon, 4 May 2020 12:05:42 +0000 (13:05 +0100)] 
gas: PR 25863: Fix scalar vmul inside it block when assembling for MVE

This fixes PR 25863 by fixing the condition in the parsing of vmul in
do_mve_vmull.  It also simplifies the code in there fixing latent issues that
would lead to NEON code being accepted when it shouldn't.

2020-05-07  Andre Vieira  <andre.simoesdiasvieira@arm.com>

Backport from mainline.
2020-05-04  Andre Vieira  <andre.simoesdiasvieira@arm.com>

PR gas/25863
* config/tc-arm.c (do_mve_vmull): Fix scalar and NEON parsing of vmul.
* testsuite/gas/arm/mve-scalar-vmult-it.d: New test.
* testsuite/gas/arm/mve-scalar-vmult-it.s: New test.

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 7 May 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 6 May 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 5 May 2020 00:00:19 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 4 May 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 3 May 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 2 May 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 1 May 2020 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 29 Apr 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Apr 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Apr 2020 00:00:20 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 25 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 24 Apr 2020 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Apr 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Apr 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoBFD: Exclude sections with no content from compress check.
Tamar Christina [Tue, 21 Apr 2020 14:16:21 +0000 (15:16 +0100)] 
BFD: Exclude sections with no content from compress check.

The check in bfd_get_full_section_contents is trying to check that we don't
allocate more space for a section than the size of the section is on disk.

Previously we excluded linker created sections since they didn't have a size on
disk.  However we also need to exclude sections with no content as well such as
the BSS section.  Space for these would not have been allocated by the assembler
and so the check would incorrectly fail.

bfd/ChangeLog:

PR binutils/24753
* compress.c (bfd_get_full_section_contents): Exclude sections with no
content.

gas/ChangeLog:

PR binutils/24753
* testsuite/gas/arm/pr24753.d: New test.
* testsuite/gas/arm/pr24753.s: New test.

(cherry picked from commit c36876fe5b5bac1c404ab2ca82bfbfb2ed9a2717)

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Apr 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Apr 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Apr 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Apr 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Apr 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Apr 2020 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

5 years agoArm: Fix LSB of GOT for Thumb2 only PLT.
Tamar Christina [Wed, 1 Apr 2020 09:47:18 +0000 (10:47 +0100)] 
Arm: Fix LSB of GOT for Thumb2 only PLT.

When you have a Thumb only PLT then the address in the GOT for PLT0 needs to
have the Thumb bit set since the instruction used in PLTn to get there is
`ldr.w pc` which is an inter-working instruction:

the PLT sequence in question is

00000120 <foo@plt>:
 120: f240 0c98  movw ip, #152 ; 0x98
 124: f2c0 0c01  movt ip, #1
 128: 44fc       add ip, pc
 12a: f8dc f000  ldr.w pc, [ip]
 12e: e7fc       b.n 12a <foo@plt+0xa>

Disassembly of section .text:

00000130 <bar>:
 130: b580       push {r7, lr}
 132: af00       add r7, sp, #0
 134: f7ff fff4  bl 120 <foo@plt>

and previously the linker would generate

Hex dump of section '.got':
 ...
  0x000101b8 40010100 00000000 00000000 10010000 @...............

Which would make it jump and transition out of thumb mode and crash since you
only have thumb mode on such cores.

Now it correctly generates

Hex dump of section '.got':
 ...
  0x000101b8 40010100 00000000 00000000 11010000 @...............

Thanks to Amol for testing patch and to rgujju for reporting it.

bfd/ChangeLog:

PR ld/16017
* elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
address in the GOT if in thumb only mode.

ld/ChangeLog:

PR ld/16017
* testsuite/ld-arm/arm-elf.exp (thumb-plt-got): New.
* testsuite/ld-arm/thumb-plt-got.d: New test.

(cherry picked from commit a7618269b727da9cf56727c22cb538ff5f0e4d25)
(cherry picked from commit 3ce23ca1de4c769c4b7247f0724a10ef5fb24a11)

5 years agoArm: Fix thumb2 PLT branch offsets.
Tamar Christina [Wed, 1 Apr 2020 09:40:07 +0000 (10:40 +0100)] 
Arm: Fix thumb2 PLT branch offsets.

When I previously changed these offsets I had incorrectly used an offset of -2
for this Thumb2 PLT.  Unfortunately because we had no tests for this PLT I had
missed that the result was incorrect.

This patch fixes the offset to PC .-4 so that it correctly addresses the
previous instruction and adds a test for this PLT stub.

bfd/ChangeLog:

* elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.

ld/ChangeLog:

* testsuite/ld-arm/arm-elf.exp (thumb-plt): New.
* testsuite/ld-arm/thumb-plt.d: New test.
* testsuite/ld-arm/thumb-plt.s: New test.

(cherry picked from commit 15ccbdd717530f81f545a716f0df1de62aee1157)
(cherry picked from commit 3ce23ca1de4c769c4b7247f0724a10ef5fb24a11)