]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
21 months agoAutomatic date update in version.in
GDB Administrator [Tue, 12 Sep 2023 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Mon, 11 Sep 2023 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Sun, 10 Sep 2023 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Sat, 9 Sep 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoaarch64: Remove unused function
Richard Sandiford [Fri, 8 Sep 2023 16:20:56 +0000 (17:20 +0100)] 
aarch64: Remove unused function

set_expected_error is no longer used.  It has been replaced by
more specific error messages.

21 months agox86: restrict prefix use with .insn VEX/XOP/EVEX
Jan Beulich [Fri, 8 Sep 2023 06:45:11 +0000 (08:45 +0200)] 
x86: restrict prefix use with .insn VEX/XOP/EVEX

Avoid triggering the respective abort() in output_insn().

21 months agoAutomatic date update in version.in
GDB Administrator [Fri, 8 Sep 2023 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Thu, 7 Sep 2023 00:02:00 +0000 (00:02 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Wed, 6 Sep 2023 00:02:21 +0000 (00:02 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Tue, 5 Sep 2023 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Mon, 4 Sep 2023 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Sun, 3 Sep 2023 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

21 months agoAutomatic date update in version.in
GDB Administrator [Sat, 2 Sep 2023 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Sep 2023 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Thu, 31 Aug 2023 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Aug 2023 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Aug 2023 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Aug 2023 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Aug 2023 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Aug 2023 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoPR30794, PowerPC gold: internal error in add_output_section_to_load
Alan Modra [Thu, 24 Aug 2023 23:42:18 +0000 (09:12 +0930)] 
PR30794, PowerPC gold: internal error in add_output_section_to_load

Caused by commit 5a97377e5513, specifically this code added to
Target_powerpc::do_relax
+      if (parameters->options().output_is_position_independent())
+       this->rela_dyn_size_
+         = this->rela_dyn_section(layout)->current_data_size();

The problem here is that if .rela.dyn isn't already created then the
call to rela_dyn_section creates it, and as this comment in
Target_powerpc::do_finalize_sections says:
  // Annoyingly, we need to make these sections now whether or
  // not we need them.  If we delay until do_relax then we
  // need to mess with the relaxation machinery checkpointing.
We can't be creating sections in do_relax.

PR 30794
* powerpc.cc (Target_powerpc::do_relax): Only set rela_dyn_size_
for size == 64, and assert that rela_dyn_ already exists.
Tidy code setting plt_thread_safe, which also only needs to be
set when size == 64 for ELFv1.

(cherry picked from commit d537f77ef3b18a5fbfd598643aaad957652e9608)

22 months agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Aug 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Aug 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Aug 2023 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Aug 2023 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Aug 2023 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Aug 2023 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Aug 2023 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Aug 2023 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Aug 2023 00:01:54 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Aug 2023 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoUpdated Russian translation for the bfd directory
Nick Clifton [Tue, 15 Aug 2023 13:27:20 +0000 (14:27 +0100)] 
Updated Russian translation for the bfd directory

22 months agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Aug 2023 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Aug 2023 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Aug 2023 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Aug 2023 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

22 months agoPR30724, cygwin ld performance regression since 014a602b86
Alan Modra [Sun, 6 Aug 2023 22:58:55 +0000 (08:28 +0930)] 
PR30724, cygwin ld performance regression since 014a602b86

According to the reporter of this bug the newlib fseek implementation
is likely slowed down by locking and fflush, only attempting to
optimise seeks when the file is opened read-only.  Thus when writing
the output we get a dramatic slowdown due to commit 014a602b86.

PR 30724
* bfd.c (enum bfd_last_io): New.
(struct bfd): Add last_io field.
* bfd-in2.h: Regenerate.
* bfd-io.c (bfd_bread, bfd_bwrite): Force seek if last_io is
opposite direction.
(bfd_seek): Reinstate optimisation for seek to same position.

(cherry picked from commit f82ee0c8dc4ee32556e23e6cd83ef083618f704f)

22 months agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Aug 2023 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Aug 2023 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Aug 2023 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Aug 2023 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Aug 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Aug 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Aug 2023 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoPR30697, ppc32 mix of local-dynamic and global-dynamic TLS
Alan Modra [Fri, 4 Aug 2023 05:39:53 +0000 (15:09 +0930)] 
PR30697, ppc32 mix of local-dynamic and global-dynamic TLS

This fixes miscounting of dynamic relocations on GOT entries when
a) there are both local-dynamic and global-dynamic tls accesss for a
   given symbol, and
b) the symbol is global with non-default visibility, and
c) the __tls_get_addr calls aren't optimised away.

PR 30697
bfd/
* elf32-ppc.c (allocate_dynrelocs): Correct local-dynamic
reloc count.
ld/
* testsuite/ld-powerpc/tls32ldgd.d,
* testsuite/ld-powerpc/tls32ldgd.s: New test.
* testsuite/ld-powerpc/powerpc.exp: Run it.

(cherry picked from commit ae33771224660dac25e64c3f70943a17bfab7681)

22 months agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Aug 2023 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Aug 2023 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

22 months agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Aug 2023 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agogas: rework timestamp preservation on doc/asconfig.texi
Jan Beulich [Tue, 1 Aug 2023 10:39:44 +0000 (12:39 +0200)] 
gas: rework timestamp preservation on doc/asconfig.texi

PR 28909

Sadly "cp -p", doing more than just preserving the time stamp, can fail
e.g. upon trying to preserve ownership (which we don't care about), as
can be observed on e.g. Cygwin. Replace the use of -p by a use of touch,
this way also only preserving modification time.

23 months agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Aug 2023 00:02:08 +0000 (00:02 +0000)] 
Automatic date update in version.in

23 months agoUpdated Spanish translation for the gprof directory
Nick Clifton [Mon, 31 Jul 2023 12:53:47 +0000 (13:53 +0100)] 
Updated Spanish translation for the gprof directory

23 months agoAutomatic date update in version.in
GDB Administrator [Mon, 31 Jul 2023 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

23 months agoReset 2.41 branch back to development mode
Nick Clifton [Sun, 30 Jul 2023 15:03:48 +0000 (16:03 +0100)] 
Reset 2.41 branch back to development mode

23 months agoThe 2.41 release! binutils-2_41
Nick Clifton [Sun, 30 Jul 2023 13:55:52 +0000 (14:55 +0100)] 
The 2.41 release!

23 months agoAutomatic date update in version.in
GDB Administrator [Sun, 30 Jul 2023 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Jul 2023 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agogas: amend X_unsigned uses
Jan Beulich [Fri, 28 Jul 2023 10:34:30 +0000 (12:34 +0200)] 
gas: amend X_unsigned uses

PR gas/30688

X_unsigned being clear does not indicate a negative number; it merely
indicates a signed one (whose sign may still be clear). Amend two uses
by an actual value check.

23 months agoRISC-V: Add actual 'Zvkt' extension support
Tsukasa OI [Wed, 26 Jul 2023 01:39:44 +0000 (01:39 +0000)] 
RISC-V: Add actual 'Zvkt' extension support

The 'Zvkt' extension is listed on the added extensions in the GNU Binutils
version 2.41 (see binutils/NEWS).  However, the support of this extension
was actually missing.

This commit adds actual support of this extension and adds implications
from 'Zvkn' and 'Zvks' superset extensions.

bfd/ChangeLog:

* elfxx-riscv.c (riscv_implicit_subsets) Add implications from
'Zvkn' and 'Zvks'.  (riscv_supported_std_z_ext): Add 'Zvkt' to
the supported extension list.

23 months agoMIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targets
YunQiang Su [Fri, 28 Jul 2023 05:00:37 +0000 (06:00 +0100)] 
MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targets

Make the n64 ABI the default for 64-bit Linux targets specified with
`-gnuabi64' suffix included in the target triplet, for configurations
such as the Debian mips64el and mips64r6el ports.  Adjust testsuite
configuration accordingly.

There are the following regressions with the new target triplet:

mips64-linux-gnuabi64  +FAIL: readelf -S bintest
mips64-linux-gnuabi64  +FAIL: MIPS reloc estimation 1
mips64el-linux-gnuabi64  +FAIL: readelf -S bintest
mips64el-linux-gnuabi64  +FAIL: MIPS reloc estimation 1

The `readelf' issue comes from a difference in section headers produced
that the `binutils/testsuite/binutils-all/readelf.s-64' pattern template
does not match.  While there has been a precedent it does not appear to
me that there is a clear advantage from adding more and more variations
to the template rather than forking the existing template into multiple
ones for a more exact match.  So this is best deferred to a separate
discussion.

The MIPS reloc estimation issue is an actual bug in `objdump', which
discards a number of trailing entries from output here for n64 composed
relocations:

DYNAMIC RELOCATION RECORDS
OFFSET           TYPE              VALUE
0000000000000000 R_MIPS_NONE       *ABS*
0000000000000000 R_MIPS_NONE       *ABS*

and consequently `ld/testsuite/ld-mips-elf/reloc-estimate-1.d' does not
match even though ELF output produced is correct according to `readelf':

Relocation section '.rel.dyn' at offset 0x10400 contains 2 entries:
  Offset          Info           Type           Sym. Value    Sym. Name
000000000000  000000000000 R_MIPS_NONE
                    Type2: R_MIPS_NONE
                    Type3: R_MIPS_NONE
000000010000  000300001203 R_MIPS_REL32      0000000000010010 foo@@V2
                    Type2: R_MIPS_64
                    Type3: R_MIPS_NONE

As a genuine bug this has to be handled separately.

Co-Authored by: Maciej W. Rozycki <macro@orcam.me.uk>

bfd/
* config.bfd: Add `mips64*el-*-linux*-gnuabi64' and
`mips64*-*-linux*-gnuabi64' targets.

binutils/
* testsuite/binutils-all/mips/mips.exp: Handle `*-*-*-gnuabi64'
targets.
* testsuite/binutils-all/objcopy.exp: Handle
`mips64*-*-*-gnuabi64' targets.
* testsuite/binutils-all/remove-relocs-01.d: Likewise.
* testsuite/binutils-all/remove-relocs-04.d: Likewise.
* testsuite/binutils-all/remove-relocs-05.d: Likewise.
* testsuite/binutils-all/remove-relocs-06.d: Likewise.

gas/
* configure.ac: Handle `mips64*-linux-gnuabi64' targets.
* configure: Regenerate.
* testsuite/gas/mips/compact-eh-eb-7.d: Handle
`mips64*-*-*-gnuabi64' targets.
* testsuite/gas/mips/compact-eh-el-7.d: Likewise.

ld/
* configure.tgt: Add `mips64*el-*-linux-gnuabi64' and
`mips64*-*-linux-gnuabi64' targets.
* testsuite/ld-undefined/undefined.exp: Handle
`mips64*-*-*-gnuabi64' targets.
* testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise.
* testsuite/ld-mips-elf/compact-eh6.d: Likewise.
* testsuite/ld-mips-elf/mips-elf.exp: Handle `*-*-*-gnuabi64'
targets.

(cherry picked from commit 29c108c9610640439daa5244a573348b7c47d994)

23 months agoMIPS/GAS/testsuite: Fix n64 compact EH failures
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/GAS/testsuite: Fix n64 compact EH failures

Expect a `.MIPS.options' section alternatively to `.reginfo' and ignore
contents of either as irrelevant for all the affected compact EH tests,
removing these regressions:

mips64-openbsd  -FAIL: Compact EH EB #1 with personality ID and FDE data
mips64-openbsd  -FAIL: Compact EH EB #2 with personality routine and FDE data
mips64-openbsd  -FAIL: Compact EH EB #3 with personality id and large FDE data
mips64-openbsd  -FAIL: Compact EH EB #4 with personality id, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EB #5 with personality routine, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EB #6 with personality id, LSDA and large FDE data
mips64-openbsd  -FAIL: Compact EH EL #1 with personality ID and FDE data
mips64-openbsd  -FAIL: Compact EH EL #2 with personality routine and FDE data
mips64-openbsd  -FAIL: Compact EH EL #3 with personality id and large FDE data
mips64-openbsd  -FAIL: Compact EH EL #4 with personality id, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EL #5 with personality routine, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EL #6 with personality id, LSDA and large FDE data
mips64el-openbsd  -FAIL: Compact EH EB #1 with personality ID and FDE data
mips64el-openbsd  -FAIL: Compact EH EB #2 with personality routine and FDE data
mips64el-openbsd  -FAIL: Compact EH EB #3 with personality id and large FDE data
mips64el-openbsd  -FAIL: Compact EH EB #4 with personality id, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EB #5 with personality routine, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EB #6 with personality id, LSDA and large FDE data
mips64el-openbsd  -FAIL: Compact EH EL #1 with personality ID and FDE data
mips64el-openbsd  -FAIL: Compact EH EL #2 with personality routine and FDE data
mips64el-openbsd  -FAIL: Compact EH EL #3 with personality id and large FDE data
mips64el-openbsd  -FAIL: Compact EH EL #4 with personality id, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EL #5 with personality routine, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EL #6 with personality id, LSDA and large FDE data

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
gas/
* testsuite/gas/mips/compact-eh-eb-1.d: Accept `.MIPS.options'
section as an alternative to `.reginfo' and ignore contents of
either.
* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
* testsuite/gas/mips/compact-eh-el-6.d: Likewise.

(cherry picked from commit 316be2b229f5bd07ebef48fd1d7b8cb103e4d815)

23 months agotestsuite: Handle composed R_MIPS_NONE relocations
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
testsuite: Handle composed R_MIPS_NONE relocations

MIPS n64 ABI has a peculiarity where all relocations are composed of
three, with subsequent relocation types set to R_MIPS_NONE if further
calculation is not required.  Example output produced by `readelf' and
`objdump' for such relocations is:

  Offset          Info           Type           Sym. Value    Sym. Name + Addend
000000000000  000800000002 R_MIPS_32         0000000000000000 foo + 0
                    Type2: R_MIPS_NONE
                    Type3: R_MIPS_NONE

and:

OFFSET           TYPE              VALUE
0000000000000000 R_MIPS_32         foo
0000000000000000 R_MIPS_NONE       *ABS*
0000000000000000 R_MIPS_NONE       *ABS*

respectively.  The presence of these extra R_MIPS_NONE entries is not
relevant for generic or even some MIPS tests, so optionally match them
with the respective dump patterns, also discarding `xfail' annotation
for MIPS/OpenBSD targets from gas/elf/missing-build-notes.d, removing
these regressions:

mips64-openbsd  -FAIL: readelf -r bintest
mips64-openbsd  -FAIL: forward expression
mips64-openbsd  -FAIL: assignment tests
mips64-openbsd  -FAIL: gas/all/none
mips64-openbsd  -XFAIL: gas/elf/missing-build-notes
mips64-openbsd  -FAIL: macro test 2
mips64-openbsd  -FAIL: macro irp
mips64-openbsd  -FAIL: macro rept
mips64-openbsd  -FAIL: nested irp/irpc/rept
mips64-openbsd  -FAIL: macro vararg
mips64-openbsd  -FAIL: mips jalx
mips64-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue
mips64el-openbsd  -FAIL: readelf -r bintest
mips64el-openbsd  -FAIL: forward expression
mips64el-openbsd  -FAIL: assignment tests
mips64el-openbsd  -FAIL: gas/all/none
mips64el-openbsd  -XFAIL: gas/elf/missing-build-notes
mips64el-openbsd  -FAIL: macro test 2
mips64el-openbsd  -FAIL: macro irp
mips64el-openbsd  -FAIL: macro rept
mips64el-openbsd  -FAIL: nested irp/irpc/rept
mips64el-openbsd  -FAIL: macro vararg
mips64el-openbsd  -FAIL: mips jalx
mips64el-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
binutils/
* testsuite/binutils-all/readelf.r-64: Optionally match extra
R_MIPS_NONE pairs.

gas/
* testsuite/gas/all/assign.d: Optionally match extra
R_MIPS_NONE pairs.
* testsuite/gas/all/fwdexp.d: Likewise.
* testsuite/gas/all/none.d: Likewise.
* testsuite/gas/macros/irp.d: Likewise.
* testsuite/gas/macros/repeat.d: Likewise.
* testsuite/gas/macros/rept.d: Likewise.
* testsuite/gas/macros/test2.d: Likewise.
* testsuite/gas/macros/vararg.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-1.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
* testsuite/gas/mips/loongson-2f-3.d: Likewise.
* testsuite/gas/mips/mips-jalx.d: Likewise.
* testsuite/gas/elf/missing-build-notes.d: Likewise.  Remove
the `xfail' tag.

ld/
* testsuite/ld-mips-elf/reloc-estimate-1.d: Optionally match
extra R_MIPS_NONE pairs.

(cherry picked from commit ed4dca900c0dbc1317917cb289255d2f8d03f732)

23 months agoMIPS/testsuite: Handle 64-bit addresses
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/testsuite: Handle 64-bit addresses

Several MIPS test cases are suitable for the n64 ABI if not for the
extra leading zeros or spaces in addresses not handled by dump patterns.
Match the characters then, removing these regressions:

mips64-openbsd  -FAIL: .set arch=FOO
mips64-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of nop issue
mips64-openbsd  -FAIL: MIPS DSP ASE for MIPS64
mips64-openbsd  -FAIL: gas/mips/align2
mips64-openbsd  -FAIL: gas/mips/align2-el
mips64-openbsd  -FAIL: Locally-resolvable PC-relative code references
mips64-openbsd  -FAIL: MIPS jalx-1
mips64-openbsd  -FAIL: JAL overflow 2
mips64el-openbsd  -FAIL: .set arch=FOO
mips64el-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of nop issue
mips64el-openbsd  -FAIL: MIPS DSP ASE for MIPS64
mips64el-openbsd  -FAIL: gas/mips/align2
mips64el-openbsd  -FAIL: gas/mips/align2-el
mips64el-openbsd  -FAIL: Locally-resolvable PC-relative code references
mips64el-openbsd  -FAIL: MIPS jalx-1
mips64el-openbsd  -FAIL: JAL overflow 2

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
gas/
* testsuite/gas/mips/align2-el.d: Match extra leading zeros
with addresses.
* testsuite/gas/mips/align2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-1.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
* testsuite/gas/mips/loongson-2f-2.d: Likewise.
* testsuite/gas/mips/loongson-2f-3.d: Likewise.
* testsuite/gas/mips/mips-jalx.d: Likewise.
* testsuite/gas/mips/mips64-dsp.d: Likewise.
* testsuite/gas/mips/pcrel-1.d: Likewise.
* testsuite/gas/mips/set-arch.d: Likewise.

ld/
* testsuite/ld-mips-elf/jaloverflow-2.d: Match extra leading
zeros and spaces with addresses as appropriate.
* testsuite/ld-mips-elf/jalx-1.d: Likewise.
* testsuite/ld-mips-elf/reloc-estimate-1.d: Likewise.

(cherry picked from commit ec76a6172f7b6d61f7d76c2bcf766122132116b8)

23 months agotestsuite: Also discard the `.MIPS.options' section
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
testsuite: Also discard the `.MIPS.options' section

Also discard the `.MIPS.options' section, used with n64 MIPS binaries,
along with similar other MIPS sections (`.reginfo', `.MIPS.abiflags')
not relevant for the test cases concerned, fixing these regressions:

mips64-openbsd  -FAIL: ld-elf/group3a
mips64-openbsd  -FAIL: ld-elf/group3b
mips64-openbsd  -FAIL: Place orphan sections (map file check)
mips64-openbsd  -FAIL: ld-elf/orphan-region
mips64-openbsd  -FAIL: ld-elf/orphan
mips64-openbsd  -FAIL: overlay size (map file check)
mips64-openbsd  -FAIL: overlay size
mips64el-openbsd  -FAIL: ld-elf/group3a
mips64el-openbsd  -FAIL: ld-elf/group3b
mips64el-openbsd  -FAIL: Place orphan sections (map file check)
mips64el-openbsd  -FAIL: ld-elf/orphan-region
mips64el-openbsd  -FAIL: ld-elf/orphan
mips64el-openbsd  -FAIL: overlay size (map file check)
mips64el-openbsd  -FAIL: overlay size

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
binutils/
* testsuite/binutils-all/strip-3.d: Add `-R .MIPS.options' to
the `strip' tag.

ld/
* testsuite/ld-elf/group.ld: Also discard `.MIPS.options'.
* testsuite/ld-elf/orphan-region.ld: Likewise.
* testsuite/ld-elf/orphan.ld: Likewise.
* testsuite/ld-mips-elf/got-page-1.ld: Likewise.
* testsuite/ld-scripts/overlay-size.t: Likewise.

(cherry picked from commit 60ec8306db150e687fc05870949056bae6c8d635)

23 months agoMIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions

IRIX 6 does not have MIPS16 stub section support in its n32 linker
scripts, causing such input sections to be propagated to the respective
output sections rather than `.text', causing dump pattern mismatches.

Expect IRIX 6 to fail with n32 testing then, removing this regression:

mips-sgi-irix6  -FAIL: MIPS16 interlinking for local functions 1 (n32)

We may choose to update IRIX 6 n32 linker scripts sometime, as it seems
a harmless change.

ld/
* testsuite/ld-mips-elf/mips-elf.exp: Expect IRIX 6 to fail with
n32 `mips16-local-stubs-1' testing.

(cherry picked from commit ec3205bbc6f2018c9907bfd6e6c6ae51a2e01432)

23 months agoMIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions

The MIPS16 interlinking test for local functions expects to be assembled
with 32-bit addressing, otherwise causing assembly warnings:

.../ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s: Assembler messages:
.../ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s:16: Warning: la used to load 64-bit address; recommend using dla instead

Use the per-ABI framework then to run the test explicitly for o32 and
n32 ABIs only, replacing the `-mips4' option from the `as' tag with
`.module mips4' pseudo-op within the source itself so as to avoid
assembly errors:

Assembler messages:
Error: -mips4 conflicts with the other architecture options, which imply -mips3

with n32 testing for some targets, and ultimately removing these
regressions:

mips64-openbsd  -FAIL: MIPS16 interlinking for local functions 1
mips64el-openbsd  -FAIL: MIPS16 interlinking for local functions 1

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
ld/
* testsuite/ld-mips-elf/mips16-local-stubs-1.d: Remove `-mips4'
from the `as' tag.
* testsuite/ld-mips-elf/mips16-local-stubs-1.s: Add `.module
mips4'.
* testsuite/ld-mips-elf/mips-elf.exp: Run `mips16-local-stubs-1'
for o32 and n32 ABIs only.

(cherry picked from commit 3c8ed624caf3317b2155a8c00a7af6a8bb6a3c10)

23 months agoMIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing

A few GAS tests expect to be assembled with 32-bit addressing, otherwise
causing an assembly warning:

.../gas/testsuite/gas/mips/fix-rm7000-2.s:11: Warning: la used to load 64-bit address; recommend using dla instead

or pattern dump mismatches against 32-bit address calculations, however
these tests do not enforce their expectation in any.  For none of them
the specific ABI used is of any relevance however, so select the o32 ABI
unconditionally, removing these failures with OpenBSD targets:

mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (micromips)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips3)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips4)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips5)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r2)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r3)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r5)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon2)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon3)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeonp)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (r4000)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (sb1)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (vr5400)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (xlr)
mips64-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon2)
mips64-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon3)
mips64-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeonp)
mips64-openbsd  -FAIL: Full MIPS R5900
mips64-openbsd  -FAIL: MIPS R5900 VU0
mips64-openbsd  -FAIL: Paired LL/SC for mips64r6 (mips64r6)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (micromips)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips3)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips4)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips5)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r2)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r3)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r5)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon2)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon3)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeonp)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (r4000)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (sb1)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (vr5400)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (xlr)
mips64el-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon2)
mips64el-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon3)
mips64el-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeonp)
mips64el-openbsd  -FAIL: Full MIPS R5900
mips64el-openbsd  -FAIL: MIPS R5900 VU0
mips64el-openbsd  -FAIL: Paired LL/SC for mips64r6 (mips64r6)

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
gas/
* testsuite/gas/mips/fix-rm7000-2.d: Add `-32' to the `as' tag.
* testsuite/gas/mips/micromips@fix-rm7000-2.d: Likewise.
* testsuite/gas/mips/r5900-full.d: Likewise.
* testsuite/gas/mips/r5900-vu0.d: Likewise.
* testsuite/gas/mips/llpscp-64.d: Add `as' tag with `-32'.
* testsuite/gas/mips/octeon-saa-saad.d: Likewise.

(cherry picked from commit ce0077a2e724146285c282037a41c68de6c0608d)

23 months agoMIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs

The `got-dump-1' test case uses 32-bit addressing, so it makes no sense
to run it with the n64 ABI.  And there is a corresponding `got-dump-2'
test already for the n64 ABI.

Use the per-ABI framework then to run the `got-dump-1' test explicitly
for o32 and n32 ABIs only.

ld/
* testsuite/ld-mips-elf/mips-elf.exp: Run `got-dump-1' for o32
and n32 ABIs only.

(cherry picked from commit 70116eb5e6c74f9b526b1fec4e39f11238cb6a34)

23 months agoMIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets

OpenBSD targets produce ELF64 files while the pattern dump expects ELF32
output and specific header sizes.  Disable it for `mips64*-*-openbsd*'
for these targets then, removing these failures:

mips64-openbsd  -FAIL: ld-mips-elf/attr-gnu-4-10
mips64el-openbsd  -FAIL: ld-mips-elf/attr-gnu-4-10

ld/
* testsuite/ld-mips-elf/attr-gnu-4-10.d: Add `notarget' tag with
`mips64*-*-openbsd*'.

(cherry picked from commit b50c220d179d239eacd7d7e120f7466e2ea47170)

23 months agoMIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets

IRIX targets do not enable the production of a `.pdr' section in GAS by
default, which causes a failure with the `attr-gnu-4-10' test case due
to a difference resulting in the number and indices of sections produced
in linker output.

As the presence or absence of this section is not relevant to this test
case, just enable it unconditionally, fixing these regressions:

mips-sgi-irix5  -FAIL: ld-mips-elf/attr-gnu-4-10
mips-sgi-irix6  -FAIL: ld-mips-elf/attr-gnu-4-10

ld/
* testsuite/ld-mips-elf/attr-gnu-4-10.d: Add `as' tag with
`-mpdr'.

(cherry picked from commit d4e5281f03764a985b1229e9417a4fd1bebcea17)

23 months agoMIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6

The `mips-sgi-irix6' target only supports IRIX linker emulations, but
most JALR relaxation tests request the relevant traditional emulation
instead, causing a link failure:

./ld-new: unrecognised emulation mode: elf32btsmipn32
Supported emulations: elf32bmipn32 elf32bsmip elf64bmip

This is clearly an omission from the conversion to use the per-ABI
framework made with commit 78da84f99405 ("MIPS/LD/testsuite: Correct
mips-elf.exp test ABI/emul/endian arrangement").  These tests are also
endianness agnostic, which was missed in the conversion as well.

Remove the unnecessary explicit ABI and endianness options then and rely
on the per-ABI framework to get things right, removing this regression:

mips-sgi-irix6  -FAIL: MIPS relax-jalr-shared n32

ld/
* testsuite/ld-mips-elf/relax-jalr-n32-shared.d: Remove flags
related to ABI and endianness selection from the `as' and `ld'
tags.
* testsuite/ld-mips-elf/relax-jalr-n64.d: Likewise.
* testsuite/ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
* testsuite/ld-mips-elf/mips-elf.exp: Remove `as' and `ld' tag
additions from the invocation of JALR relaxation tests.

(cherry picked from commit 94052ee4ccf0ac64b5f55da59878f13d567ef3cf)

23 months agoMIPS/LD/testsuite: Fix unaligned JALX failures with OpenBSD targets
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD/testsuite: Fix unaligned JALX failures with OpenBSD targets

There are only n64 linker emulations included with `mips64*-*-openbsd*'
targets, however the unaligned JALX tests insist on running across all
targets and force the n32 ABI, causing link errors with the targets
concerned, e.g.:

./ld-new: tmpdir/unaligned-jalx-0.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-jalx-0.o
./ld-new: tmpdir/unaligned-insn.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-insn.o

Convert the tests then to use the per-ABI framework and run them for the
o32 and n32 ABIs, removing these regressions:

mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1

Similar tests for the n64 ABI can be added separately, using suitable
dump patterns.

ld/
* testsuite/ld-mips-elf/unaligned-jalx-0.d: Remove `-32' from
the `as' tag.
* testsuite/ld-mips-elf/unaligned-jalx-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-2.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-3.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d: Likewise.
* testsuite/ld-mips-elf/mips-elf.exp: Run unaligned JALX tests
with `run_dump_test_o32' and `run_dump_test_n32' rather than
`run_dump_test'.

(cherry picked from commit 67e789ae32fadc540c10839f08ad53ff01e2d732)

23 months agoMIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets

Compact EH #7 tests use output templates that are not suitable for the
n64 ABI, which `mips64*-*-openbsd*' targets use by default, because the
contents of the sections examined are expected to be differnt.  Disable
the tests then, removing these regressions:

mips64-openbsd  -FAIL: Compact EH EB #7 with personality id and fallback FDE
mips64-openbsd  -FAIL: Compact EH EL #7 with personality id and fallback FDE
mips64el-openbsd  -FAIL: Compact EH EB #7 with personality id and fallback FDE
mips64el-openbsd  -FAIL: Compact EH EL #7 with personality id and fallback FDE

Suitable corresponding tests for the n64 ABI can be added separately.

gas/
* testsuite/gas/mips/compact-eh-eb-7.d: Exclude for
`mips64*-*-openbsd*'.
* testsuite/gas/mips/compact-eh-el-7.d: Likewise.

(cherry picked from commit 2b4a60ab59f14a8fc1039c0cea41d22674447c1e)

23 months agoMIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS
YunQiang Su [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS

In ld/emulparams/elf64bmip-defs.sh there is no explicit handling of the
`.interp' section, which causes it to be positioned in output at an odd
place.

Let's include it with INITIAL_READONLY_SECTIONS, just like o32/n32 do,
fixing a regression from commit 5a8e7be242f3 ("INITIAL_READONLY_SECTIONS
in elf.sc"), where the handling of n64 was missed due to an unfortunate
sequence of events where ld/emulparams/elf64bmip-defs.sh was only added
with commit 94bb04b3c611 ("Use .reginfo rather than .MIPS.options in n32
linker scripts") the day before.

Add test cases covering section ordering across the three ABIs.  This
change also fixes ld/pr23658-2:

FAIL: Build pr23658-2

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>
ld/ChangeLog:
* emulparams/elf64bmip-defs.sh: Include `.interp' with
INITIAL_READONLY_SECTIONS.
* testsuite/ld-mips-elf/pie-n64.d: Adjust addresses.
* testsuite/ld-mips-elf/sections-1-o32.rd: New test.
* testsuite/ld-mips-elf/sections-1-o32t.rd: New test.
* testsuite/ld-mips-elf/sections-1-n32.rd: New test.
* testsuite/ld-mips-elf/sections-1-n32t.rd: New test.
* testsuite/ld-mips-elf/sections-1-n32p.rd: New test.
* testsuite/ld-mips-elf/sections-1-n64.rd: New test.
* testsuite/ld-mips-elf/sections-1-n64t.rd: New test.
* testsuite/ld-mips-elf/sections-2-o32.rd: New test.
* testsuite/ld-mips-elf/sections-2-o32t.rd: New test.
* testsuite/ld-mips-elf/sections-2-n32.rd: New test.
* testsuite/ld-mips-elf/sections-2-n32t.rd: New test.
* testsuite/ld-mips-elf/sections-2-n32p.rd: New test.
* testsuite/ld-mips-elf/sections-2-n64.rd: New test.
* testsuite/ld-mips-elf/sections-2-n64t.rd: New test.
* testsuite/ld-mips-elf/sections.s: New test source.
* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.

(cherry picked from commit f625926792da741ab196ef71c16e481331965b6f)

23 months agoRevert "MIPS: support mips*64 as CPU and gnuabi64 as ABI"
Maciej W. Rozycki [Fri, 28 Jul 2023 05:00:36 +0000 (06:00 +0100)] 
Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI"

This reverts commit 32f1c80375ebe8ad25d9805ee5889f0006c51e59.  It had
two unrelated changes lumped together, one of which changed the meaning
of the `mipsisa64*-*-linux*' target triplets, which was not properly
evaluated.

(cherry picked from commit cc66ad2d2a63cec2eaafd7bbc6a9204490816c0b)

23 months agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Jul 2023 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Jul 2023 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Jul 2023 00:01:54 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Jul 2023 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoLoongArch: Fix immediate overflow check bug
mengqinggang [Mon, 24 Jul 2023 09:08:26 +0000 (10:08 +0100)] 
LoongArch: Fix immediate overflow check bug

  * elfnn-loongarch.c (RELOCATE_CALC_PC32_HI20): Redefined.
  (RELOCATE_CALC_PC64_HI32): Redefined.
  * elfxx-loongarch.c (reloc_bits_pcrel20_s2): Delete.
  (reloc_bits_b16): Delete.
  (reloc_bits_b21): Delete.
  (reloc_bits_b26): Delete.
  (reloc_sign_bits): New.

23 months agoUpdated Serbian translations for bfd, gold and opcodes
Nick Clifton [Mon, 24 Jul 2023 08:14:37 +0000 (09:14 +0100)] 
Updated Serbian translations for bfd, gold and opcodes

23 months agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Jul 2023 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Jul 2023 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Jul 2023 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

23 months agoMIPS: Don't move __gnu_lto_slim to .scommon
Alan Modra [Thu, 20 Jul 2023 08:25:38 +0000 (17:55 +0930)] 
MIPS: Don't move __gnu_lto_slim to .scommon

* elfxx-mips.c (_bfd_mips_elf_symbol_processing): Don't treat
__gnu_lto_slim as SHN_MIPS_SCOMMON.
(_bfd_mips_elf_add_symbol_hook): Likewise.

23 months agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Jul 2023 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Jul 2023 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agomerged
Nick Clifton [Wed, 19 Jul 2023 12:00:47 +0000 (13:00 +0100)] 
merged

23 months agoUpdated Romanian translation for the opcodes directory
Nick Clifton [Wed, 19 Jul 2023 10:54:53 +0000 (11:54 +0100)] 
Updated Romanian translation for the opcodes directory

23 months agoUpdated Romainian translation for the opcodes directory
Nick Clifton [Wed, 19 Jul 2023 10:54:53 +0000 (11:54 +0100)] 
Updated Romainian translation for the opcodes directory

23 months ago[GOLD, PowerPC64] Debug info relocation overflow
Alan Modra [Wed, 19 Jul 2023 00:56:04 +0000 (10:26 +0930)] 
[GOLD, PowerPC64] Debug info relocation overflow

It is possible to build huge binaries on powerpc64, where 32-bit
addresses in debug info are insufficient to descibe locations in the
binary.  Help out the user, and only warn about debug overflows.

* powerpc.cc (Target_powerpc::Relocate::relocate): Warn on
relocation overflows in debug info.

(cherry picked from commit 03c02b696e90714a0ae2c0200d3c65cfffcaa1ee)

23 months agoPR10957, Missing option to really print section+offset
Alan Modra [Sat, 15 Jul 2023 10:17:10 +0000 (19:47 +0930)] 
PR10957, Missing option to really print section+offset

Many of the reloc error messages have already been converted from
using %C to using %H in ld.bfd, to print section+offset as well as
file/line/function.  This catches a few remaining, and changes gold to
do the same.

PR 10957
bfd/
* elf32-sh.c (sh_elf_relocate_section): Use %H in error messages.
gold/
* object.cc (Relocate_info::location): Always report section+offset.
* testsuite/debug_msg.sh: Adjust to suit.
* testsuite/x32_overflow_pc32.sh: Likewise.
* testsuite/x86_64_overflow_pc32.sh: Likewise.
ld/
* emultempl/pe.em (read_addend): Use %H in error message.
* emultempl/pep.em (read_addend): Likewise.
* ldcref.c (check_reloc_refs): Likewise.
* ldmain.c (warning_find_reloc, undefined_symbol): Likewise.
* pe-dll.c (pe_create_import_fixup): Likewise.
* testsuite/ld-cris/undef2.d: Adjust expected output to suit.
* testsuite/ld-cris/undef3.d: Likewise.
* testsuite/ld-elf/shared.exp: Likewise.
* testsuite/ld-i386/compressed1.d: Likewise.
* testsuite/ld-ia64/line.exp: Likewise.
* testsuite/ld-plugin/lto.exp: Likewise.
* testsuite/ld-undefined/undefined.exp: Likewise.
* testsuite/ld-x86-64/compressed1.d: Likewise.
* testsuite/ld-x86-64/line.exp: Likewise.
* testsuite/ld-x86-64/pr27587.err: Likewise.

(cherry picked from commit 02d2a36902c7b0fefe05e8d9bdbf11e846ac71fe)

23 months agoFix loongarch build with gcc-4.5
Alan Modra [Fri, 14 Jul 2023 01:18:05 +0000 (10:48 +0930)] 
Fix loongarch build with gcc-4.5

* loongarch-opc.c (loongarch_alias_opcodes): Don't trigger
gcc-4.5 bug in handling of struct initialisation.

(cherry picked from commit 4993e5cc1e2e1e192f56f5788453c1b6f9cca894)

23 months agoelf_object_p load of dynamic symbols
Alan Modra [Thu, 13 Jul 2023 04:02:42 +0000 (13:32 +0930)] 
elf_object_p load of dynamic symbols

This fixes an uninitialised memory access on a fuzzed file:
0 0xf22e9b in offset_from_vma /src/binutils-gdb/bfd/elf.c:1899:2
1 0xf1e90f in _bfd_elf_get_dynamic_symbols /src/binutils-gdb/bfd/elf.c:2099:13
2 0x10e6a54 in bfd_elf32_object_p /src/binutils-gdb/bfd/elfcode.h:851:9

Hopefully it will also stop any attempt to load dynamic symbols from
eu-strip debug files.

* elfcode.h (elf_object_p): Do not attempt to load dynamic
symbols for a file with no section headers until all the
program headers are swapped in.  Do not fail on eu-strip debug
files.

(cherry picked from commit 22e90ac5af46c01ee4972cf04e835266862bbb35)

23 months agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Jul 2023 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agogprofng: 30602 [2.41] gprofng test hangs on i686-linux-gnu
Vladimir Mezentsev [Wed, 12 Jul 2023 22:03:28 +0000 (15:03 -0700)] 
gprofng: 30602 [2.41] gprofng test hangs on i686-linux-gnu

There were several problems in the gprofng testing:
 - we did not catch a timeout for each test.
 - we used exit() to stop a failed test. But this stops all other tests.
 - we used a time_t (long) type in smalltest.c instead of a long long type.

PR gprofng/30602
* configure.ac: Launch only native testing.
* configure: Rebuild.
* testsuite/config/default.exp: Set TEST_TIMEOUT.
* testsuite/gprofng.display/setpath_map.exp: Use return instead of exit.
* testsuite/gprofng.display/gp-archive.exp: Likewise.
* testsuite/gprofng.display/gp-collect-app_F.exp: Likewise.
* testsuite/gprofng.display/display.exp: Delete an unnecessary test
for native testing.
* testsuite/lib/display-lib.exp (run_native_host_cmd): Add timeout.
* testsuite/lib/smalltest.c: Use a long long type instead of time_t.

23 months agoUpdated Swedish translation for the binutils subdirectory
Nick Clifton [Tue, 18 Jul 2023 16:11:59 +0000 (17:11 +0100)] 
Updated Swedish translation for the binutils subdirectory

23 months agoPR 30632 - ld segfaults if linker script includes a STARTUP line.
Pter Chubb [Tue, 18 Jul 2023 16:06:14 +0000 (17:06 +0100)] 
PR 30632 - ld segfaults if linker script includes a STARTUP line.

23 months agoAutomatic date update in version.in
GDB Administrator [Tue, 18 Jul 2023 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

23 months agold/PDB: fix off-by-1 in add_globals_ref()
Mark Harmstone [Mon, 17 Jul 2023 12:25:05 +0000 (13:25 +0100)] 
ld/PDB: fix off-by-1 in add_globals_ref()

23 months agoAutomatic date update in version.in
GDB Administrator [Mon, 17 Jul 2023 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in