]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
5 weeks agox86: Check MODRM for call and jmp in binutils older than 2.45 binutils-2_40-branch
H.J. Lu [Thu, 22 May 2025 03:29:49 +0000 (11:29 +0800)] 
x86: Check MODRM for call and jmp in binutils older than 2.45

When i386 glibc was assembled with commit:

commit 11c2852449825a5f486f63bc40aabed56b7c04c1 (HEAD)
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Feb 21 10:24:50 2025 +0100

    x86: widen @got{,pcrel} support to PUSH and APX IMUL

    With us doing the transformation to an immediate operand for MOV and
    various ALU insns, there's little reason to then not support the same
    conversion for the other two insns which have respective immediate
    operand forms. Unfortunately for IMUL (due to the 0F opcode prefix)
    there's no suitable relocation, so the pre-APX forms cannot be marked
    for relaxation in the assembler.

"pushl main@GOT(%ebx)" in sysdeps/i386/start.S was assembled to

1c: ff b3 00 00 00 00 push 0x0(%ebx) 1e: R_386_GOT32X main

Linkers in binutils versions older than 2.45 treated it as jmp and relaxed
it to

22c: e9 cf ff ff ff   jmp    200 <main>
231: 90               nop

Update elf_i386_convert_load_reloc in binutils versions older than 2.45
to check MODRM for call and jmp to work with i386 glibc assembled with
binutils 2.45 or newer.  Do the same in elf_x86_64_convert_load_reloc.

PR ld/32991
* elf32-i386.c (elf_i386_convert_load_reloc): Check MODRM for
call and jmp.
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 452f5511154ca02095a271cf085e17f536587207)

7 months agoLoongArch: ld:Report an error when seeing an unrecognized relocation
Lulu Cai [Thu, 21 Mar 2024 07:16:05 +0000 (15:16 +0800)] 
LoongArch: ld:Report an error when seeing an unrecognized relocation

If we generate an object file using an assembler with the new
relocations added, and then linking those files with an older
linker, the link will still complete and the linked file will
be generated.
In this case we should report an error instead of continuing
the linking process.

(cherry picked from commit 5966e2eb3fed61ebe5c091a074b368b9238a68c1)

7 months agoLoongArch: Enable gas sort relocs
Jinyang He [Fri, 11 Aug 2023 08:10:40 +0000 (16:10 +0800)] 
LoongArch: Enable gas sort relocs

The md_pre_output_hook creating fixup is asynchronous, causing relocs
may be out of order in .eh_frame. Define GAS_SORT_RELOCS so that reorder
relocs when write_relocs.

Reported-by: Rui Ueyama <rui314@gmail.com>
(cherry picked from commit 7c93730fe50c22129e751d8479e64bc970b75aac)

10 months agolibctf: fix ref leak of names of newly-inserted non-root-visible types
Nick Alcock [Mon, 29 Jul 2024 11:45:09 +0000 (12:45 +0100)] 
libctf: fix ref leak of names of newly-inserted non-root-visible types

A bug in ctf_dtd_delete led to refs in the string table to the
names of non-root-visible types not being removed when the DTD
was.  This seems harmless, but actually it would lead to a write
down a pointer into freed memory if such a type was ctf_rollback()ed
over and then the dict was serialized (updating all the refs as the
strtab was serialized in turn).

Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62
("libctf: create: non-root-visible types should not appear in name tables")
which is included in binutils 2.35.

libctf/
* ctf-create.c (ctf_dtd_delete): Remove refs for all types
with names, not just root-visible ones.

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)

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

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 30 Jun 2023 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Jun 2023 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Jun 2023 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Jun 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, 24 Jun 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years ago[GOLD] powerpc DT_RELACOUNT
Alan Modra [Thu, 22 Jun 2023 23:18:38 +0000 (08:48 +0930)] 
[GOLD] powerpc DT_RELACOUNT

DT_RELACOUNT was calculated incorrectly, and relative relocs not
sorted as they should be to the start of .rela.dyn, due to adding one
particular class of dynamic reloc using the wrong "add" method.

* powerpc.cc (Target_powerpc::Scan::global): Add relative
dyn relocs for ADDR64 and similar using add_global_relative.

(cherry picked from commit 027614abf11de9e79a335df4e1f9a788b7ab0063)

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Jun 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoPR30536, ppc64el gold linker produces unusable clang-16 binary
Alan Modra [Wed, 21 Jun 2023 13:14:09 +0000 (22:44 +0930)] 
PR30536, ppc64el gold linker produces unusable clang-16 binary

In commit 0961e631575b, the fix for PR30217, make_lplt_section and
make_brlt_section were changed to use rela_dyn_ rather than their own
separate dynamic reloc sections.  This fails miserably whenever brlt_
is needed for long branches, due to needing to iterate sizing and thus
reset brlt_ sizes.

PR 30536
PR 30217
* powerpc.cc (Target_powerpc::make_brlt_section): Don't use
rela_dyn_.

(cherry picked from commit dc808a2ebab337b5517add4c1aad298cf836c239)

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Jun 2023 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Jun 2023 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Jun 2023 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Jun 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Jun 2023 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Jun 2023 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Jun 2023 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Jun 2023 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Jun 2023 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Jun 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, 9 Jun 2023 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Jun 2023 00:02:02 +0000 (00:02 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Jun 2023 00:02:43 +0000 (00:02 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Jun 2023 00:01:36 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Jun 2023 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Jun 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, 31 May 2023 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 May 2023 00:01:41 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 May 2023 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 May 2023 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 May 2023 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 May 2023 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoUpdated Swedish translation for the opcodes directory
Nick Clifton [Tue, 23 May 2023 12:52:23 +0000 (13:52 +0100)] 
Updated Swedish translation for the opcodes directory

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 May 2023 00:02:22 +0000 (00:02 +0000)] 
Automatic date update in version.in

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 May 2023 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 May 2023 00:01:38 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 May 2023 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 May 2023 00:01:58 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 May 2023 00:02:38 +0000 (00:02 +0000)] 
Automatic date update in version.in

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 May 2023 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 May 2023 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 May 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, 2 May 2023 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Apr 2023 00:01:22 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Apr 2023 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Apr 2023 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Apr 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, 25 Apr 2023 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoNew Georgian translation for the bfd sub-directory.
Nick Clifton [Mon, 24 Apr 2023 12:07:06 +0000 (13:07 +0100)] 
New Georgian translation for the bfd sub-directory.

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Apr 2023 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Apr 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

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

2 years agoUpdated Hungarian translation for the gprof directory
Nick Clifton [Wed, 19 Apr 2023 09:37:02 +0000 (10:37 +0100)] 
Updated Hungarian translation for the gprof directory

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Apr 2023 00:01:58 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Apr 2023 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Apr 2023 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

2 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Apr 2023 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agolto: Don't add indirect symbols for versioned aliases in IR
H.J. Lu [Wed, 29 Mar 2023 20:06:26 +0000 (13:06 -0700)] 
lto: Don't add indirect symbols for versioned aliases in IR

Linker adds indirect symbols for versioned symbol aliases, which are
created by ".symver foo, foo@FOO", by checking symbol type, value and
section so that references to foo will be replaced by references to
foo@FOO if foo and foo@FOO have the same symbol type, value and section.
But in IR, since all symbols of the same type have the same value and
section, we can't tell if a symbol is an alias of another symbol by
their types, values and sections.  We shouldn't add indirect symbols
for versioned symbol aliases in IR.

bfd/

PR ld/30281
* elflink.c (elf_link_add_object_symbols): Don't add indirect
symbols for ".symver foo, foo@FOO" aliases in IR.

ld/

PR ld/30281
* testsuite/ld-plugin/lto.exp: Add PR ld/30281 test.
* testsuite/ld-plugin/pr30281.t: New file.
* testsuite/ld-plugin/pr30281.c: Likewise.

(cherry picked from commit 79cfb928f552401e3cec7a208a87eb74aa0d2d8b)

2 years agoAutomatic date update in version.in
GDB Administrator [Tue, 11 Apr 2023 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

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

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

2 years agoAutomatic date update in version.in
GDB Administrator [Fri, 7 Apr 2023 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

2 years agogas: arm: Change warning message to not reference specific A-class architecture revision
Stam Markianos-Wright [Tue, 17 Jan 2023 13:37:40 +0000 (13:37 +0000)] 
gas: arm: Change warning message to not reference specific A-class architecture revision

We noticed that a warning message about the use of scalar fp16
instructions being UNPREDICTABLE when conditionalized in an IT
block referenced the specific A-class architecture revision
ARMv8.2-A.
Many of these instructions are now also part of ARMv8.1-M, so
the warning message had become misleading.  Here we just change
the message to not specify an architecture revision at all and
update all testing accordingly.  This was done with a simple
find-n-replace within the binutils sources.  No tests have
regressed for the arm target.

gas/ChangeLog:

        * config/tc-arm.c (do_scalar_fp16_v82_encode): Remove
        ARMv8.2-A from the warning message.
        (do_neon_movhf): Likewise
        * testsuite/gas/arm/armv8-2-fp16-scalar-bad.l: Likewise
        * testsuite/gas/arm/mve-vaddsub-it-bad.l: Likewise
        * testsuite/gas/arm/mve-vcvtne-it-bad.l: Likewise
        * testsuite/gas/arm/mve-vcvtne-it.d: Likewise