]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Mar 2023 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Feb 2023 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoUpdated Serbian translations for gold, gprof and opcodes sub-directories
Nick Clifton [Mon, 27 Feb 2023 12:49:24 +0000 (12:49 +0000)] 
Updated Serbian translations for gold, gprof and opcodes sub-directories

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Feb 2023 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Feb 2023 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 25 Feb 2023 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 24 Feb 2023 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Feb 2023 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Feb 2023 00:01:49 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Feb 2023 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoUpdated translations for the bfd and gprof directories.
Nick Clifton [Mon, 20 Feb 2023 12:32:30 +0000 (12:32 +0000)] 
Updated translations for the bfd and gprof directories.

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Feb 2023 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Feb 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Feb 2023 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Feb 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Feb 2023 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Feb 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agogas: correct symbol name comparison in .startof./.sizeof. handling
Jan Beulich [Tue, 14 Feb 2023 07:35:02 +0000 (08:35 +0100)] 
gas: correct symbol name comparison in .startof./.sizeof. handling

In 162c6aef1f3a ("gas: fold symbol table entries generated for
.startof.() / .sizeof.()") I screwed up quite badly, inverting the case
sensitive and case insensitive comparison functions.

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Feb 2023 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Feb 2023 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Feb 2023 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Feb 2023 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Feb 2023 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoconfigure: remove dependencies on gmp and mpfr when gdb is disabled
Clément Chigot [Tue, 3 Jan 2023 13:24:43 +0000 (14:24 +0100)] 
configure: remove dependencies on gmp and mpfr when gdb is disabled

Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
about GMP and MPFR for gdb builds have been moved to the toplevel
configure.
However, it doesn't take into account the --disable-gdb option. Meaning
that a build without gdb will require these libraries even if not
needed.

ChangeLog:

* configure.ac: Skip GMP and MPFR when --disable-gdb is
provided.
* configure: Regenerate.

(cherry picked from commit 5fb0e308577143ceb313fde5538dc9ecb038f29f)

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Feb 2023 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Feb 2023 00:01:10 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Feb 2023 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoRegen config files
Alan Modra [Mon, 6 Feb 2023 00:18:59 +0000 (10:48 +1030)] 
Regen config files

For the version update to 2.40.0

2 years agoPass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp
Romain Geissler [Sun, 5 Feb 2023 13:56:34 +0000 (13:56 +0000)] 
Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp

2 years agobpf: fix error conversion from long unsigned int to unsigned int [-Werror=overflow]
Guillermo E. Martinez [Fri, 3 Feb 2023 17:17:49 +0000 (11:17 -0600)] 
bpf: fix error conversion from long unsigned int to unsigned int [-Werror=overflow]

Regenerating BPF target using the maintainer mode emits:
.../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow]
  57 |   64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }

The use of a narrow size to handle the mask CGEN in instruction format
is causing this error.  Additionally eBPF `call' instructions
constructed by expressions using symbols (BPF_PSEUDO_CALL) emits
annotations in `src' field of the instruction, used to identify BPF
target endianness.

cpu/
* bpf.cpu (define-call-insn): Remove `src' field from
instruction mask.

include/
*opcode/cge.h (CGEN_IFMT): Adjust mask bit width.

opcodes/
* bpf-opc.c: Regenerate.

(cherry picked from commit 7f6ebecd56e690012b05af0a492280765b17f186)

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Feb 2023 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Feb 2023 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Feb 2023 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Feb 2023 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Feb 2023 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Feb 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoUpdated Swedish translation for the binutils sub-directory
Nick Clifton [Tue, 31 Jan 2023 13:02:51 +0000 (13:02 +0000)] 
Updated Swedish translation for the binutils sub-directory

2 years agoRISC-V: make C-extension JAL available again for (32-bit) assembly
Jan Beulich [Tue, 31 Jan 2023 08:47:22 +0000 (09:47 +0100)] 
RISC-V: make C-extension JAL available again for (32-bit) assembly

Along with the normal JAL alias, the C-extension one should have been
moved as well by 839189bc932e ("RISC-V: re-arrange opcode table for
consistent alias handling"), for the assembler to actually be able to
use it where/when possible.

Since neither this nor any other compressed branch insn was being tested
so far, take the opportunity and introduce a new testcase covering those.

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 31 Jan 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Jan 2023 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Jan 2023 00:02:15 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Jan 2023 00:02:03 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Jan 2023 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agogprofng: PR30043 libgprofng.so.* are installed to a wrong location
Vladimir Mezentsev [Thu, 26 Jan 2023 03:21:38 +0000 (19:21 -0800)] 
gprofng: PR30043 libgprofng.so.* are installed to a wrong location

gprofng/ChangeLog
2023-01-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/30043
PR gprofng/28972
* src/Makefile.am: Use lib_LTLIBRARIES instead of pkglib_LTLIBRARIES.
* src/Makefile.in: Rebuild.

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Jan 2023 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agogprofng: PR29521 [docs] man pages are not in the release tarball
Vladimir Mezentsev [Fri, 20 Jan 2023 23:39:55 +0000 (15:39 -0800)] 
gprofng: PR29521 [docs] man pages are not in the release tarball

gprofng/ChangeLog
2023-01-20  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/29521
* configure.ac: Check if $MAKEINFO and $HELP2MAN are missing.
* Makefile.am: Build doc if $MAKEINFO exists.
* doc/gprofng.texi: Update documentation for gprofng.
* doc/Makefile.am: Build gprofng.1.
* src/Makefile.am: Move the build of gprofng.1 to doc/Makefile.am.
* configure: Rebuild.
* Makefile.in: Rebuild.
* doc/Makefile.in: Rebuild.
* src/Makefile.in: Rebuild.

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Jan 2023 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Jan 2023 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoUpdated Swedish translation for the binutils sub-directory
Nick Clifton [Mon, 23 Jan 2023 10:53:53 +0000 (10:53 +0000)] 
Updated Swedish translation for the binutils sub-directory

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Jan 2023 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Jan 2023 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Jan 2023 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Jan 2023 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agotoplevel: Makefile.def: add install-strip dependency on libsframe
Indu Bhagat [Thu, 19 Jan 2023 07:17:49 +0000 (23:17 -0800)] 
toplevel: Makefile.def: add install-strip dependency on libsframe

As noted in PR libsframe/30014 - FTBFS: install-strip fails because
bfdlib relinks and fails to find libsframe, the install time
dependencies of libbfd need to be updated.

PR libsframe/30014
* Makefile.def: Reflect that libsframe needs to installed before
libbfd.  Reorder a bit to better track libsframe dependencies.
* Makefile.in: Regenerate.

(cherry picked from commit b8d21eb0cd10d6127e77cc437d82e949adb0c454)

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Jan 2023 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Jan 2023 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoFix version number snafu in some configuration files: 2.40.00 should be 2.40
Nick Clifton [Tue, 17 Jan 2023 12:02:56 +0000 (12:02 +0000)] 
Fix version number snafu in some configuration files: 2.40.00 should be 2.40

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Jan 2023 00:02:20 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agolibctf: update regexp to allow makeinfo to build document
Enze Li [Sat, 14 Jan 2023 03:33:48 +0000 (11:33 +0800)] 
libctf: update regexp to allow makeinfo to build document

While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
following warning,

 checking for makeinfo... makeinfo --split-size=5000000
 configure: WARNING:
 *** Makeinfo is too old. Info documentation will not be built.

then I checked the version of makeinfo, it said,
======
$ makeinfo --version
texi2any (GNU texinfo) 7.0.1

Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
======

After digging a little bit, it became quite obvious that a dot is
missing in regexp that makes it impossible to match versions higher than
7.0, and here's the solution:

-       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then

However, Eli pointed out that the solution above has another problem: it
will stop working when Texinfo 10.1 will be released.  Meanwhile, he
suggested to solve this problem permanently.  That is, we don't care
about the minor version for Texinfo > 6.9, we only care about the major
version.

In this way, the problem will be resolved permanently, thanks to Eli.

libctf/ChangeLog:

* configure: Regenerated.
* configure.ac: Update regexp to match versions higher than 7.0.

2 years agoUpdated translations for the gas and binutils sub-directories
Nick Clifton [Mon, 16 Jan 2023 10:44:44 +0000 (10:44 +0000)] 
Updated translations for the gas and binutils sub-directories

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Jan 2023 00:01:23 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Jan 2023 00:01:21 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoRe-enable development. Update version to 2.40.0
Nick Clifton [Sat, 14 Jan 2023 15:34:17 +0000 (15:34 +0000)] 
Re-enable development.  Update version to 2.40.0

2 years agoFix snafu in version number. Regenerate files binutils-2_40
Nick Clifton [Sat, 14 Jan 2023 13:52:46 +0000 (13:52 +0000)] 
Fix snafu in version number.  Regenerate files

2 years agoSet development and experimental to false. Update version number to 2.40. Add relea...
Nick Clifton [Sat, 14 Jan 2023 13:42:32 +0000 (13:42 +0000)] 
Set development and experimental to false.  Update version number to 2.40.  Add release markers.  Regenerate files

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Jan 2023 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoUpdated Romainian translation for the bfd sub-directory
Nick Clifton [Fri, 13 Jan 2023 11:43:18 +0000 (11:43 +0000)] 
Updated Romainian translation for the bfd sub-directory

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Jan 2023 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoARM: Fix ld bloat introduced between binutils-2.38 and 2.39
Hans-Peter Nilsson [Tue, 3 Jan 2023 02:19:54 +0000 (03:19 +0100)] 
ARM: Fix ld bloat introduced between binutils-2.38 and 2.39

Since commit 9833b7757d24, "PR28824, relro security issues",
ELF_MAXPAGESIZE matters much more, with regards to layout of
the linked file.  That commit fixed an actual bug, but also
exposes a problem for targets were that value is too high.

For example, for ARM(32, a.k.a. "Aarch32") specifically
bfd_arch_arm, it's set to 64 KiB, making all Linux(/GNU)
targets pay an extra amount of up to 60 KiB of bloat in
DSO:s and executables.  This matters when there are many
such files, and where storage is expensive.

It's *mostly* bloat when using a Linux kernel, as ARM(32) is
a good example of an target where ELF_MAXPAGESIZE is set to
an extreme value for an obscure corner-case.  The ARM
(32-bit) kernel has 4 KiB pages, has had that value forever,
and can't be configured to any other value.  The use-case is
IIUC "Aarch32" emulation on an "Aarch64" (arm64) kernel, but
not just that, but a setup where the Linux page-size is
configured to something other than the *default* 4 KiB.  Not
sure there actually any such systems in use, again with
both Aarch32 compatibility support and a non-4KiB pagesize,
with all the warnings in the kernel config and requiring the
"EXPERT" level set on.

So, let's do like x86-64 in a2267dbfc9e1 "x86-64: Use only
one default max-page-size" and set ELF_MAXPAGESIZE to 4096.

bfd:
* elf32-arm.c (ELF_MAXPAGESIZE): Always set to 0x1000.
(cherry picked from commit 1a26a53a0dee39106ba58fcb15496c5f13074652)

2 years agold/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000
Hans-Peter Nilsson [Wed, 11 Jan 2023 15:34:04 +0000 (16:34 +0100)] 
ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000

Many tests reflect a setting of ELF_MAXPAGESIZE to 64 KiB.
With ELF_MAXPAGESIZE changed to 4 KiB, layout is sometimes
different and symbols end up in other places.  Avoid churn
and regexpification of old test patterns by passing the
max-page-size setting active at the time.

ld/testsuite:

* testsuite/ld-arm/arm-elf.exp,
        testsuite/ld-arm/non-contiguous-arm2.d,
        testsuite/ld-arm/non-contiguous-arm3.d,
        testsuite/ld-arm/non-contiguous-arm5.d,
        testsuite/ld-arm/non-contiguous-arm6.d,
        testsuite/ld-arm/thumb-plt-got.d, testsuite/ld-arm/thumb-plt.d:
Pass -z max-page-size=0x10000 explicitly to test that rely on
that value in output-matching patterns.
(cherry picked from commit b305015577bb92d3041e55a72ca8cd43f7c05748)

2 years agolibctf: ctf-link outdated input check faulty
Nick Alcock [Mon, 9 Jan 2023 13:43:09 +0000 (13:43 +0000)] 
libctf: ctf-link outdated input check faulty

This check has a pair of faults which, combined, can lead to memory
corruption.  Firstly, it assumes that the values of the ctf_link_inputs
hash are ctf_dict_t's: they are not, they are ctf_link_input_t's, a much
shorter structure.  So the flags check which is the core of this is
faulty (but happens, by chance, to give the right output on most
architectures, since usually we happen to get a 0 here, so the test that
checks this usually passes).  Worse, the warning that is emitted when
the test fails is added to the wrong dict -- it's added to the input
dict, whose warning list is never consumed, rendering the whole check
useless.  But the dict it adds to is still the wrong type, so we end up
overwriting something deep in memory (or, much more likely,
dereferencing a garbage pointer and crashing).

Fixing both reveals another problem: the link input is an *archive*
consisting of multiple members, so we have to consider whether to check
all of them for the outdated-func-info thing we are checking here.
However, no compiler exists that emits a mixture of members with this
flag on and members with it off, and the linker always reserializes (and
upgrades) such things when it sees them: so all members in a given
archive must have the same value of the flag, so we only need to check
one member per input archive.

libctf/
PR libctf/29983
* ctf-link.c (ctf_link_warn_outdated_inputs): Get the types of
        members of ctf_link_inputs right, fixing a possible spurious
        tesst failure / wild pointer deref / overwrite.  Emit the
        warning message into the right dict.

2 years agoEnsure that libbacktrace/allocfail.sh is not deleted when creating release tarballs.
Nick Clifton [Thu, 12 Jan 2023 13:37:59 +0000 (13:37 +0000)] 
Ensure that libbacktrace/allocfail.sh is not deleted when creating release tarballs.

* Makefile.am (CLEANFILES): Import patch from upstream to prevent
allocafail.sh from being removed when running 'make clean'.

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Jan 2023 00:02:07 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agoFix a potential illegal memory access in the BFD library when parsing a corrupt DWARF...
Nick Clifton [Wed, 11 Jan 2023 12:13:46 +0000 (12:13 +0000)] 
Fix a potential illegal memory access in the BFD library when parsing a corrupt DWARF file.

PR 29988
* dwarf2.c (read_indexed_address): Fix check for an out of range
offset.

2 years agogas/RISC-V: adjust assembler for opcode table re-ordering
Jan Beulich [Wed, 11 Jan 2023 09:31:43 +0000 (10:31 +0100)] 
gas/RISC-V: adjust assembler for opcode table re-ordering

PR gas/29940

With the single-operand JAL entry now sitting ahead of the two-operand
one, the parsing of a two-operand insn would first try to parse an 'a'-
style operand, resulting in the insertion of bogus (and otherwise
unused) undefined symbols in the symbol table, having register names.
Since 'a' is used as 1st operand only with J and JAL, and since JAL is
the only insn _also_ allowing for a register as 1st operand (and then
there being a 2nd one), special case this parsing aspect right there.

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Jan 2023 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoIBM zSystems: Fix offset relative to static TLS
Stefan Schulze Frielinghaus [Tue, 10 Jan 2023 13:51:47 +0000 (14:51 +0100)] 
IBM zSystems: Fix offset relative to static TLS

For local exec TLS relocations of the form foo@NTPOFF+x the addend was
ignored.

bfd/ChangeLog:

* elf32-s390.c (elf_s390_relocate_section): Honor addend for
R_390_TLS_LE32.
* elf64-s390.c (elf_s390_relocate_section): Honor addend for
R_390_TLS_LE64.

ld/ChangeLog:

* testsuite/ld-s390/reloctlsle-1.d: New test.
* testsuite/ld-s390/reloctlsle-1.s: New test.

(cherry picked from commit aefebe82dc89711384b85329daa48d04c1d3a45b)

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Jan 2023 00:01:55 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agosframe: fix the defined SFRAME_FRE_TYPE_*_LIMIT constants
Indu Bhagat [Fri, 6 Jan 2023 17:30:20 +0000 (09:30 -0800)] 
sframe: fix the defined SFRAME_FRE_TYPE_*_LIMIT constants

An earlier commit 3f107464 defined the SFRAME_FRE_TYPE_*_LIMIT
constants.  These constants are used (by gas and libsframe) to pick an
SFrame FRE type based on the function size.  Those constants, however,
were buggy, causing the generated SFrame sections to be bloated as
SFRAME_FRE_TYPE_ADDR2/SFRAME_FRE_TYPE_ADDR4 got chosen more often than
necessary.

gas/
* sframe-opt.c (sframe_estimate_size_before_relax): Use
typecast.
(sframe_convert_frag): Likewise.

libsframe/
* sframe.c (sframe_calc_fre_type): Use a more appropriate type
for argument.  Adjust the check for SFRAME_FRE_TYPE_ADDR4_LIMIT
to keep it warning-free but meaningful.

include/
* sframe-api.h (sframe_calc_fre_type): Use a more appropriate
type for the argument.
* sframe.h (SFRAME_FRE_TYPE_ADDR1_LIMIT): Correct the constant.
(SFRAME_FRE_TYPE_ADDR2_LIMIT): Likewise.
(SFRAME_FRE_TYPE_ADDR4_LIMIT): Likewise.

(cherry picked from commit 725a19bfd142c845bf76ae28f6289972fd1cf5db)

2 years agolibsframe: adjust an incorrect check in flip_sframe
Indu Bhagat [Fri, 6 Jan 2023 17:29:48 +0000 (09:29 -0800)] 
libsframe: adjust an incorrect check in flip_sframe

When sframe_encoder_write needs to flip the buffer containing the SFrame
section before writing, it is not necessary that the SFrame FDES are in
the order of their sfde_func_start_fre_off.  On the contrary, SFrame
FDEs will be sorted in the order of their start address.  So, remove
this incorrect assumption which is basically assuming that the last
sfde_func_start_fre_off seen will help determine the end of the flipped
buffer.

The function now keeps track of the bytes_flipped and then compares it with
the expected value.  Also, added two more checks at appropriate places:
 - check that the SFrame FDE read is within bounds
 - check that the SFrame FRE read is within bounds

libsframe/

* sframe.c (flip_sframe): Adjust an incorrect check.
Add other checks to ensure reads are within the buffer size.

(cherry picked from commit cd9aea32cffd8089f6f63f4eb86d4dccfc0b3850)

2 years agoSkip ld/pr23169 test on arm.
Christophe Lyon [Mon, 2 Jan 2023 16:14:15 +0000 (16:14 +0000)] 
Skip ld/pr23169 test on arm.

The test is already skipped on several targets (including AArch64)
because it's invalid.

* testsuite/ld-ifunc/ifunc.exp: Skip pr23169 on arm.

2 years agoFix PR18841 ifunc relocation ordering
Christophe Lyon [Mon, 2 Jan 2023 15:46:31 +0000 (15:46 +0000)] 
Fix PR18841 ifunc relocation ordering

In order to get the ifunc relocs properly sorted the correct class
needs to be returned.  The code mimics what has been done for AArch64.

Fixes:
FAIL: Run pr18841 with libpr18841b.so
FAIL: Run pr18841 with libpr18841c.so
FAIL: Run pr18841 with libpr18841bn.so (-z now)
FAIL: Run pr18841 with libpr18841cn.so (-z now)

bfd/
PR ld/18841
* elf32-arm.c (elf32_arm_reloc_type_class): Return
reloc_class_ifunc for ifunc symbols.

ld/testsuite/
* ld-arm/ifunc-12.rd: Update relocations order.
* ld-arm/ifunc-3.rd: Likewise.
* ld-arm/ifunc-4.rd: Likewise.

2 years agoUpdated transaltions for the gprof and binutils sub-directories
Nick Clifton [Mon, 9 Jan 2023 10:23:27 +0000 (10:23 +0000)] 
Updated transaltions for the gprof and binutils sub-directories

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Jan 2023 00:02:09 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agoPR29972, inconsistent format specification in singular form
Alan Modra [Sun, 8 Jan 2023 02:38:46 +0000 (13:08 +1030)] 
PR29972, inconsistent format specification in singular form

PR 29972
* readelf.c (process_dynamic_section): Correct format string.

(cherry picked from commit 02da71ee20ec71f7b3be85cf2266e09c124983bf)

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Jan 2023 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Jan 2023 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agold: yet another PDB build fix (or workaround)
Jan Beulich [Fri, 6 Jan 2023 12:36:39 +0000 (13:36 +0100)] 
ld: yet another PDB build fix (or workaround)

Older bash looks to improperly deal with backslashes in here-documents,
leaving them in place on the escaped double quotes inside the parameter
expansion. Convert to a model without using such a construct, by simply
splitting the here-documents into three ones.

2 years agoUpdated Bulgarian and Russian translations for LD and BFD respectively
Nick Clifton [Fri, 6 Jan 2023 11:01:44 +0000 (11:01 +0000)] 
Updated Bulgarian and Russian translations for LD and BFD respectively

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Jan 2023 00:01:51 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAvoid unaligned pointer reads in PEP idata section
Nick Clifton [Thu, 5 Jan 2023 11:57:00 +0000 (11:57 +0000)] 
Avoid unaligned pointer reads in PEP idata section

2 years agoUpdated Bulgarian and Russian translations for the gprof subdirectory
Nick Clifton [Thu, 5 Jan 2023 08:26:39 +0000 (08:26 +0000)] 
Updated Bulgarian and Russian translations for the gprof subdirectory

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Jan 2023 00:01:26 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoMerge config/picflag.m4 from gcc
Alan Modra [Wed, 4 Jan 2023 03:06:24 +0000 (13:36 +1030)] 
Merge config/picflag.m4 from gcc

2 years agoUpdate some more copyright year ranges
Alan Modra [Mon, 2 Jan 2023 04:12:54 +0000 (14:42 +1030)] 
Update some more copyright year ranges

These files disappear in commit 3002e78a7d3d but are still on the branch.

2 years agoUpdate year range in gprofng copyright notices
Alan Modra [Sun, 1 Jan 2023 12:31:20 +0000 (23:01 +1030)] 
Update year range in gprofng copyright notices

This adds 'Innovative Computing Labs' as an external author to
update-copyright.py, to cover the copyright notice in
gprofng/common/opteron_pcbe.c, and uses that plus another external
author 'Oracle and' to update gprofng copyright dates.  I'm not going
to commit 'Oracle and' as an accepted author, but that covers the
string "Copyright (c) 2006, 2012, Oracle and/or its affiliates. All
rights reserved." found in gprofng/testsuite/gprofng.display/jsynprog
files.

2 years agoUpdate year range in copyright notice of binutils files
Alan Modra [Sun, 1 Jan 2023 06:08:42 +0000 (16:38 +1030)] 
Update year range in copyright notice of binutils files

The newer update-copyright.py fixes file encoding too, removing cr/lf
on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and
embedded cr in binutils/testsuite/binutils-all/ar.exp string match.

2 years agoUpdate etc/update-copyright.py
Alan Modra [Sun, 1 Jan 2023 06:03:14 +0000 (16:33 +1030)] 
Update etc/update-copyright.py

This picks up some improvements from gcc/contrib.  exceptions must
derive from BaseException, port to python3, retain original file mode,
fix name of script in examples.

Adds libsframe to list of default dirs.  I would have added gprofng
too but there are some files claiming copyright by authors other than
the Free Software Foundation.

2 years agoFix AArch64 linker testsuite failures triggered by differences in build environments.
Andreas K. Huettel [Wed, 4 Jan 2023 09:31:12 +0000 (09:31 +0000)] 
Fix AArch64 linker testsuite failures triggered by differences in build environments.

PR 29843
* testsuite/ld-aarch64/bti-plt-5.d: Relax regxps slightly to allow
for differences in build environments.
* testsuite/ld-aarch64/tls-relax-gdesc-le-now.d: Likewise.

2 years agoAvoid unaligned pointer reads in PEP .idata section
Mark Harmstone [Sat, 31 Dec 2022 20:55:46 +0000 (20:55 +0000)] 
Avoid unaligned pointer reads in PEP .idata section

This is something I discovered when working on aarch64, though it's
relevant to x86_64 too.

The PE32+ imports are located in the .idata section, which starts off
with a 20-byte structure for each DLL, containing offsets into the rest
of the section. This is the Import Directory Table in
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format, which
is a concatenation of the .idata$2 sections. This is then followed by an
20 zero bytes generated by the linker script, which calls this .idata$3.

After this comes the .idata$4 entries for each function, which the
loader overwrites with the function pointers. Because there's no padding
between .idata$3 and .idata$4, this means that if there's an even number
of DLLs, the function pointers won't be aligned on an 8-byte boundary.

Misaligned reads are slower on x86_64, but this is more important on
aarch64, as the e.g. `ldr x0, [x0, :lo12:__imp__func]` the compiler
might generate requires __imp__func (the .idata$4 entry) to be aligned
to 8 bytes. Without this you get IMAGE_REL_ARM64_PAGEOFFSET_12L overflow
errors.