]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
14 months agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Apr 2024 00:01:48 +0000 (00:01 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Apr 2024 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Apr 2024 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Apr 2024 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Apr 2024 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Apr 2024 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Apr 2024 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Apr 2024 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Apr 2024 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoRe: PR26978, Inconsistency for strong foo@v1 and weak foo@@v1
Alan Modra [Sun, 7 Apr 2024 22:46:20 +0000 (08:16 +0930)] 
Re: PR26978, Inconsistency for strong foo@v1 and weak foo@@v1

Commit 726d7d1ecf opened a hole that allowed a u.i.link loop to be
created, resulting in _bfd_generic_link_add_one_symbol never
returning.  Fix that.  Note that the MIND case handles two types of
redefinition.  For a new indirect symbol we'll have string non-NULL.
For a new def, string will be NULL.  So moving the string comparison
earlier would work.  However, we've already looked up inh in the first
case so can dispense with name comparisons.  Either way, for a new def
we'll get to the defweak test and possibly cycle.  Which is what we
want here.

PR 31615
PR 26978
* linker.c (_bfd_generic_link_add_one_symbol <MIND>): Test for
exactly matching indirect symbols before cycling on a defweak.

(cherry picked from commit 248b6326a49ed49e2f627d3bddbac514a074bac0)

14 months agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Apr 2024 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Apr 2024 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Apr 2024 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Apr 2024 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Apr 2024 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

14 months agohppa: Implement PA 2.0 symbolic relocations for long displacements
John David Anglin [Mon, 1 Apr 2024 23:00:52 +0000 (23:00 +0000)] 
hppa: Implement PA 2.0 symbolic relocations for long displacements

The PA 2.0 architecture introduced several new load and store
instructions with long displacements.  These include floating
point loads and stores for word mode, and integer and floating
point loads and stores for double words.  Currently, ld does
not correctly support symbolic relocations for these instructions.

If these are used, ld applies the standard R_PARISC_DPREL14R
relocation and corrupts the instruction.  This change uses
bfd_hppa_insn2fmt to determine the correct relocation format.

We need to check the computed displacement as the immediate
value used in these instruction must be a multiple of 4 or 8
depending on whether the access is for a word or double word.

A misaligned offset can potentially occur if the symbol is not
properly aligned or if $global$ (the global pointer) is not
double word aligned.  $global$ is provided as a .data section
start symbol.  The patch adjusts elf.sc and hppalinux.sh to
align .data to a 8-byte boundary in non-shared and non-pie
links.

2024-04-01  John David Anglin  <danglin@gcc.gnu.org>

PR ld/31503

bfd/ChangeLog:

* elf32-hppa.c (final_link_relocate): Output

ld/ChangeLog:

* emulparams/hppalinux.sh (DATA_SECTION_ALIGNMENT): Define.
* scripttempl/elf.sc: Align .data section to DATA_SECTION_ALIGNMENT
when relocating.

15 months agox86/APX: Remove KEYLOCKER and SHA promotions from EVEX MAP4
Cui, Lili [Wed, 3 Apr 2024 03:10:58 +0000 (11:10 +0800)] 
x86/APX: Remove KEYLOCKER and SHA promotions from EVEX MAP4

APX spec removed KEYLOCKER and SHA promotions from EVEX MAP4.
https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html

gas/ChangeLog:

        * NEWS: Mention that remove KEYLOCKER and SHA promotions from EVEX
* MAP4.
        * testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l: Removed KEYLOCKER
        * and SHA instructions.
        * testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s: Ditto.
        * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto.
        * testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-evex-promoted.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-evex-promoted.s: Ditto.

opcodes/ChangeLog:

        * i386-dis-evex-prefix.h: Removed KEYLOCKER and SHA instructions.
        * i386-dis-evex.h: Ditto.
        * i386-opc.tbl: Ditto.
        * i386-tbl.h: Regenerated.

15 months agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Apr 2024 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Apr 2024 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Apr 2024 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sun, 31 Mar 2024 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sat, 30 Mar 2024 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Mar 2024 00:02:21 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Mar 2024 00:03:27 +0000 (00:03 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Wed, 27 Mar 2024 00:02:57 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Tue, 26 Mar 2024 00:02:44 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Mon, 25 Mar 2024 00:01:59 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Mar 2024 00:02:07 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sat, 23 Mar 2024 00:02:02 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Fri, 22 Mar 2024 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Thu, 21 Mar 2024 00:03:33 +0000 (00:03 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Wed, 20 Mar 2024 00:02:39 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Tue, 19 Mar 2024 00:01:57 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Mon, 18 Mar 2024 00:02:28 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sun, 17 Mar 2024 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sat, 16 Mar 2024 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Fri, 15 Mar 2024 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoaarch64: Remove B16B16, SVE2p1 and SME2p1
Andrew Carlotti [Tue, 27 Feb 2024 19:41:29 +0000 (19:41 +0000)] 
aarch64: Remove B16B16, SVE2p1 and SME2p1

Support for these extensions is broken and incomplete in the 2.42
branch, with a number of syntax and opcode bugs.  This patch removes the
flags and documentation, to avoid any further suggestion that this
extension is fully and correctly supported.

15 months agoAutomatic date update in version.in
GDB Administrator [Thu, 14 Mar 2024 00:02:56 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Wed, 13 Mar 2024 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Tue, 12 Mar 2024 00:02:53 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Mon, 11 Mar 2024 00:01:56 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Sun, 10 Mar 2024 00:01:16 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoRe: Move bfd_init to bfd.c
Alan Modra [Sat, 9 Mar 2024 09:18:48 +0000 (19:48 +1030)] 
Re: Move bfd_init to bfd.c

Commit b1c95bc4dd73 cleared some bfd static variables, with bad
results since bfd_set_error_program_name is often called before
bfd_init.

* bfd.c (bfd_init): Don't clear _bfd_error_program_name.

(cherry picked from commit 0c947d990a92fd48ac0aa887df7e1e055fa0d680)

15 months agoprint cached error messages using _bfd_error_handler
Alan Modra [Sat, 9 Mar 2024 02:56:19 +0000 (13:26 +1030)] 
print cached error messages using _bfd_error_handler

* format.c (print_warnmsg): Use _bfd_error_handler to print
cached messages.

(cherry picked from commit bd8d76258f86f93b20e6bd94f58033a49eb0d3ec)

15 months agoAutomatic date update in version.in
GDB Administrator [Sat, 9 Mar 2024 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Fri, 8 Mar 2024 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Thu, 7 Mar 2024 00:02:38 +0000 (00:02 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Wed, 6 Mar 2024 00:03:15 +0000 (00:03 +0000)] 
Automatic date update in version.in

15 months agoAutomatic date update in version.in
GDB Administrator [Tue, 5 Mar 2024 00:01:49 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Mon, 4 Mar 2024 00:02:26 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sun, 3 Mar 2024 00:01:49 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sat, 2 Mar 2024 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Mar 2024 00:02:06 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoaarch64: Fix the 2nd operand in gcsstr and gcssttr instructions.
Srinath Parvathaneni [Thu, 29 Feb 2024 21:06:25 +0000 (21:06 +0000)] 
aarch64: Fix the 2nd operand in gcsstr and gcssttr instructions.

The assembler wrongly expects plain register name instead of
memory-form 2nd operand for gcsstr and gcssttr instructions.
This patch fixes the issue.

16 months agoAutomatic date update in version.in
GDB Administrator [Thu, 29 Feb 2024 00:02:11 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Feb 2024 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Tue, 27 Feb 2024 00:01:53 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Feb 2024 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Feb 2024 00:02:22 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Feb 2024 00:01:32 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Feb 2024 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Feb 2024 00:01:53 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Feb 2024 00:01:41 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Feb 2024 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Feb 2024 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Feb 2024 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Feb 2024 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agox86: Display -msse-check= default as none
H.J. Lu [Thu, 15 Feb 2024 23:00:31 +0000 (15:00 -0800)] 
x86: Display -msse-check= default as none

Display -msse-check= default as none for "as --help" since its default
is none, not warning.

PR gas/31389
* config/tc-i386.c (md_show_usage): Change -msse-check= default
to none.

(cherry picked from commit 7a6a03c499ad899c1d1dd93beccbb62795feb1db)

16 months agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Feb 2024 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Feb 2024 00:01:40 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Feb 2024 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoPowerPC: Add support for Power11 options
Peter Bergner [Fri, 9 Feb 2024 16:51:30 +0000 (10:51 -0600)] 
PowerPC: Add support for Power11 options

binutils/
* doc/binutils.texi (PowerPC -M option): Mention power11 and pwr11.

gas/
* config/tc-ppc.c: (md_show_usage): Mention -mpower11 and -mpwr11.
* doc/c-ppc.texi: Likewise.

opcodes/
* ppc-dis.c (ppc_opts): Add "power11" and "pwr11" entries.
(powerpc_init_dialect): Default to "power11".

(cherry picked from commit 4199cf1e152daab0460f08cc7dbd1f727ac3e4cc)

16 months agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Feb 2024 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Feb 2024 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Feb 2024 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

16 months agox86-64: Add R_X86_64_CODE_6_GOTTPOFF
H.J. Lu [Sat, 3 Feb 2024 22:32:17 +0000 (14:32 -0800)] 
x86-64: Add R_X86_64_CODE_6_GOTTPOFF

For

add %reg1, name@gottpoff(%rip), %reg2

and

add name@gottpoff(%rip), %reg1, %reg2

add

 #define R_X86_64_CODE_6_GOTTPOFF 50

if the instruction starts at 6 bytes before the relocation offset.
They are similar to R_X86_64_GOTTPOFF.  Linker can covert GOTTPOFF to

add $name@tpoff, %reg1, %reg2

Rewrite fx_tcbit, fx_tcbit2 and fx_tcbit3 usage to generate
R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX, R_X86_64_CODE_4_GOTPCRELX,
R_X86_64_CODE_4_GOTTPOFF, R_X86_64_CODE_4_GOTPC32_TLSDESC and
R_X86_64_CODE_6_GOTTPOFF.

NB: There is no need to check BFD_RELOC_X86_64_CODE_4_GOTTPOFF in
md_assemble since there is only BFD_RELOC_X86_64_GOTTPOFF at this
stage, which will be converted to BFD_RELOC_X86_64_CODE_4_GOTTPOFF
or BFD_RELOC_X86_64_CODE_6_GOTTPOFF in i386_validate_fix.

5 relocations:

 #define R_X86_64_CODE_5_GOTPCRELX 46
 #define R_X86_64_CODE_5_GOTTPOFF 47
 #define R_X86_64_CODE_5_GOTPC32_TLSDESC 48
 #define R_X86_64_CODE_6_GOTPCRELX 49
 #define R_X86_64_CODE_6_GOTPC32_TLSDESC 51

are added for completeness and they are unused.

bfd/

* elf64-x86-64.c (x86_64_elf_howto_table): Add
R_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTTPOFF,
R_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPCRELX,
R_X86_64_CODE_6_GOTTPOFF and R_X86_64_CODE_6_GOTPC32_TLSDESC.
(R_X86_64_standard): Updated.
(x86_64_reloc_map): Add R_X86_64_CODE_5_GOTPCRELX,
R_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTPC32_TLSDESC,
R_X86_64_CODE_6_GOTPCRELX, R_X86_64_CODE_6_GOTTPOFF and
R_X86_64_CODE_6_GOTPC32_TLSDESC.
(elf_x86_64_check_tls_transition): Handle
R_X86_64_CODE_6_GOTTPOFF.
(elf_x86_64_tls_transition): Likewise.
(elf_x86_64_scan_relocs): Handle R_X86_64_CODE_6_GOTTPOFF.
Issue an error for R_X86_64_CODE_5_GOTPCRELX,
R_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTPC32_TLSDESC,
R_X86_64_CODE_6_GOTPCRELX and R_X86_64_CODE_6_GOTPC32_TLSDESC.
(elf_x86_64_relocate_section): Handle R_X86_64_CODE_6_GOTTPOFF.
* reloc.c (bfd_reloc_code_real): Add
BFD_RELOC_X86_64_CODE_5_GOTPCRELX,
BFD_RELOC_X86_64_CODE_5_GOTTPOFF,
BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC,
BFD_RELOC_X86_64_CODE_6_GOTPCRELX,
BFD_RELOC_X86_64_CODE_6_GOTTPOFF and
BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.

elfcpp/

* x86_64.h (R_X86_64_CODE_5_GOTPCRELX): New.
(R_X86_64_CODE_5_GOTTPOFF): Likewise.
(R_X86_64_CODE_5_GOTPC32_TLSDESC): Likewise.
(R_X86_64_CODE_6_GOTPCRELX): Likewise.
(R_X86_64_CODE_6_GOTTPOFF): Likewise.
(R_X86_64_CODE_6_GOTPC32_TLSDESC): Likewise.

gas/

* config/tc-i386.c (tc_i386_fix_adjustable): Handle
BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
(md_assemble): Don't check BFD_RELOC_X86_64_CODE_4_GOTTPOFF.
Allow "add %reg1, foo@gottpoff(%rip), %reg2".
(output_disp): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.  Rewrite
setting fx_tcbitX bits for BFD_RELOC_X86_64_GOTTPOFF,
BFD_RELOC_X86_64_GOTPC32_TLSDESC and BFD_RELOC_32_PCREL.
(md_apply_fix): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
(i386_validate_fix): Rewrite fx_tcbitX bit checking for
BFD_RELOC_X86_64_GOTTPOFF, BFD_RELOC_X86_64_GOTPC32_TLSDESC and
BFD_RELOC_32_PCREL.
(tc_gen_reloc): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
* testsuite/gas/i386/x86-64-gottpoff.d: Updated.
* testsuite/gas/i386/x86-64-gottpoff.s: Add tests for
"add %reg1, foo@gottpoff(%rip), %reg2" and
"add foo@gottpoff(%rip), %reg, %reg2".

gold/

* x86_64.cc (Target_x86_64::optimize_tls_reloc): Handle
R_X86_64_CODE_6_GOTTPOFF.
(Target_x86_64::Scan::get_reference_flags): Likewise.
(Target_x86_64::Scan::local): Likewise.
(Target_x86_64::Scan::global): Likewise.
(Target_x86_64::Relocate::relocate): Likewise.
(Target_x86_64::Relocate::relocate_tls): Likewise.
(Target_x86_64::Relocate::tls_ie_to_le): Handle.
R_X86_64_CODE_6_GOTTPOFF.
* testsuite/x86_64_ie_to_le.s: Add tests for
"add %reg1, foo@gottpoff(%rip), %reg2" and
"add foo@gottpoff(%rip), %reg, %reg2".
* testsuite/x86_64_ie_to_le.sh: Updated.

include/

* elf/x86-64.h (elf_x86_64_reloc_type): Add
R_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTTPOFF,
R_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPCRELX,
R_X86_64_CODE_6_GOTTPOFF and R_X86_64_CODE_6_GOTPC32_TLSDESC.

ld/

* testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF
tests.
* testsuite/ld-x86-64/tlsbindesc.d: Updated.
* testsuite/ld-x86-64/tlsbindesc.rd: Likewise.

(cherry picked from commit 5bc71c2a6b8efb27089baa1fecded82be4f550a7)

16 months agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Feb 2024 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agox86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}
Jan Beulich [Fri, 9 Feb 2024 07:38:52 +0000 (08:38 +0100)] 
x86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}

In eea4357967b6 ("x86/APX: VROUND{P,S}{S,D} can generally be encoded") I
failed to add the AVX512* ISA dependency of the two new entries.

16 months agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Feb 2024 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

16 months agoPR31208, strip can break ELF alignment requirements
Alan Modra [Thu, 8 Feb 2024 20:34:22 +0000 (07:04 +1030)] 
PR31208, strip can break ELF alignment requirements

In https://sourceware.org/pipermail/binutils/2007-August/053261.html
(git commit 3dea8fca8b86) I disabled a then new linker feature that
removed empty PT_LOAD headers in cases where a user specified program
headers, and for objcopy.  This can be a problem for objcopy/strip and
since objcopy operates on sections, any part of a PT_LOAD loading file
contents not covered by a section will be omitted anyway.

PR 31208
* elf.c (_bfd_elf_map_sections_to_segments): Pass remove_empty_load
as true to elf_modify_segment_map for objcopy/strip.

(cherry picked from commit 7f26d260ef76a4cb2873a7815bef187005528c19)

16 months agoPR 31283 windmc: Parse input correctly on big endian hosts
Richard W.M. Jones [Wed, 24 Jan 2024 12:25:23 +0000 (12:25 +0000)] 
PR 31283 windmc: Parse input correctly on big endian hosts

On big endian hosts (eg. s390x) the windmc tool fails to parse even
trivial files:

  $ cat test.mc
  ;
  $ ./binutils/windmc ./test.mc
  In test.mc at line 1: parser: syntax error.
  In test.mc at line 1: fatal: syntax error.

The tool starts by reading the input as Windows CP1252 and then
converting it internally into an array of UTF-16LE, which it then
processes as an array of unsigned short (typedef unichar).

There are lots of ways this is wrong, but in the specific case of big
endian machines the little endian pairs of bytes are byte-swapped.

For example, the ';' character in the input above is first converted
to UTF16-LE byte sequence { 0x3b, 0x00 }, which is then cast to
unsigned short.  On a big endian machine the first unichar appears to
be 0x3b00.  The lexer is unable to recognize this as the comment
character ((unichar)';') and so parsing fails.

The simple fix is to convert the input to UTF-16BE on big endian
machines (and do the reverse conversion when writing the output).

Fixes: https://sourceware.org/bugzilla/show_bug.cgi?id=31283
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit 3f8f9745c75b333515f399fc2908ede2ed8014e9)

16 months agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Feb 2024 00:02:08 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Feb 2024 00:02:09 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoLink x86-64 mark-plt-1.so with --no-as-needed
Alan Modra [Tue, 6 Feb 2024 02:29:06 +0000 (12:59 +1030)] 
Link x86-64 mark-plt-1.so with --no-as-needed

Fixes
FAIL: Build mark-plt-1.so
where gcc is built with default --as-needed.

* testsuite/ld-x86-64/x86-64.exp (Build mark-plt-1.so): Pass
--no-as-needed.

(cherry picked from commit 60c95acdaca94eca79b81ec75bfab97826cc0271)

16 months agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Feb 2024 00:02:18 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Feb 2024 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

16 months agoLoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtab
Xi Ruoyao [Fri, 2 Feb 2024 13:00:58 +0000 (21:00 +0800)] 
LoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtab

When a symbol is referred with %le_{hi20,lo12,add}_r, it's definitely a
TLS symbol and we should set its type to TLS in the symtab.  Otherwise
when building Perl with gcc-14 -flto, we get:

/usr/bin/ld: PL_current_context: TLS definition in
./miniperl.ltrans0.ltrans.o section .tbss mismatches non-TLS reference
in ./miniperl.ltrans1.ltrans.o

A minimal reproducer:

    $ cat t1.s
    .section .tbss
    .globl x
    x: .word 0
    $ cat t2.s
    f:
      lu12i.w $a0, %le_hi20_r(x)
      add.d   $a0, $a0, $tp, %le_add_r(x)
      li.w    $a1, 1
      st.w    $a1, $a0, %le_lo12_r(x)
    $ gas/as-new t1.s -o t1.o
    $ gas/as-new t2.s -o t2.o
    $ ld/ld-new t1.o t2.o
    ld/ld-new: x: TLS definition in t1.o section .tbss mismatches
    non-TLS reference in t2.o

Unfortunately this was undetected before Binutils-2.42 release because
GCC < 14 does not use %le_*_r, and without LTO it's very rare to have a
TLS LE definition and its reference in two different translation units.
So this fix should be backported to Binutils-2.42 branch too.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
(cherry picked from commit 029e52bac7f3a6dd8b39f7f3d298b73174da806b)

16 months agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Feb 2024 00:02:12 +0000 (00:02 +0000)] 
Automatic date update in version.in

16 months agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Feb 2024 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

17 months agox86: Disallow instructions with length > 15 bytes
H.J. Lu [Thu, 1 Feb 2024 22:42:08 +0000 (14:42 -0800)] 
x86: Disallow instructions with length > 15 bytes

It is a hard error when an instruction length exceeds the limit of 15
bytes:

[hjl@gnu-cfl-3 tmp]$ cat x.s
.text
xacquire lock addq $0x11223344, %fs:(,%eax)
[hjl@gnu-cfl-3 tmp]$ gcc -c x.s
x.s: Assembler messages:
x.s:2: Warning: instruction length of 16 bytes exceeds the limit of 15
[hjl@gnu-cfl-3 tmp]$ objdump -dw x.o

x.o:     file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <.text>:
   0: 64 67 f2 f0 48 81 04 05 00 00 00 00 44 33 22  xacquire lock (bad)
   f: 11                    .byte 0x11
[hjl@gnu-cfl-3 tmp]$

and

[hjl@gnu-cfl-3 tmp]$ cat z.s
addq $0xe0, %fs:0, %rdx
[hjl@gnu-cfl-3 tmp]$ as -o z.o z.s
z.s: Assembler messages:
z.s:1: Warning: instruction length of 16 bytes exceeds the limit of 15
[hjl@gnu-cfl-3 tmp]$ objdump -dw z.o

z.o:     file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <.text>:
   0: 64 62 f4 ec 18 81 04 25 00 00 00 00 e0 00 00  (bad)
...
[hjl@gnu-cfl-3 pr31323]$

Instructions with length > 15 bytes are always invalid.  It is quite easy
to generate invalid instructions with APX now.  We should issue an error
when instruction length exceeds the limit of 15 bytes.

PR gas/31323
* config/tc-i386.c (output_insn): Issue an error when instruction
length exceeds the limit of 15 bytes.
* testsuite/gas/i386/oversized16.l: Updated.
* testsuite/gas/i386/oversized64.l: Likewise.
* testsuite/gas/i386/x86-64-apx-inval.l: New file.
* testsuite/gas/i386/x86-64-apx-inval.s: Likewise.

(cherry picked from commit 46bd909328c3c8f3d6fc7a505b2fad1eea72d872)

17 months agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Feb 2024 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

17 months agoAutomatic date update in version.in
GDB Administrator [Thu, 1 Feb 2024 00:02:02 +0000 (00:02 +0000)] 
Automatic date update in version.in

17 months agoMention support for AMD/znver5 in GAS
Nick Clifton [Wed, 31 Jan 2024 15:42:14 +0000 (15:42 +0000)] 
Mention support for AMD/znver5 in GAS

17 months agoPR31124: Addendum: Remove PROVIDE of __flmap_init_label, __flmap.
Georg-Johann Lay [Wed, 31 Jan 2024 11:24:22 +0000 (11:24 +0000)] 
PR31124: Addendum: Remove PROVIDE of __flmap_init_label, __flmap.

Supply these symbols as computed by the linker scripts, even when there are weak definitions.
PR 31124
    * scripttempl/avr.sc (__flmap, __flmap_init_label): Remove PROVIDE.

17 months agoAutomatic date update in version.in
GDB Administrator [Wed, 31 Jan 2024 00:02:39 +0000 (00:02 +0000)] 
Automatic date update in version.in

17 months agogas: scfi: add missing ginsn-cofi-1 testcase files
Indu Bhagat [Tue, 30 Jan 2024 08:35:04 +0000 (00:35 -0800)] 
gas: scfi: add missing ginsn-cofi-1 testcase files

Previous commit a58dc5427f0 intended to bring the following two commits
from master branch:

 91cdbed4d7b gas: scfi: untraceable control flow should be a hard error
 16cbeae1b27 x86: testsuite: scfi: adjust COFI testcase

But missed adding the testcase files. Fix the failure by adding the
missing files.

gas/testsuite/
* gas/scfi/x86_64/ginsn-cofi-1.l: New test.
* gas/scfi/x86_64/ginsn-cofi-1.s: Likewise.

17 months agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Jan 2024 00:02:25 +0000 (00:02 +0000)] 
Automatic date update in version.in

17 months agoPR31314, chew crashing on use of uninitialized value
Alan Modra [Mon, 29 Jan 2024 23:08:56 +0000 (09:38 +1030)] 
PR31314, chew crashing on use of uninitialized value

The "drop" call in wrap_comment already increments pc.  Defining DOCDD
in proto.str is a warning fix.

PR 31314
* chew.c (wrap_comment): Don't increment pc.
* proto.str (DOCDD): Define.

(cherry picked from commit e175a2fc60cb9709c4461cdd8596ae05e529d67b)

17 months agoSet version number to 2.42.0 and re-enable development
Nick Clifton [Mon, 29 Jan 2024 16:01:42 +0000 (16:01 +0000)] 
Set version number to 2.42.0 and re-enable development