]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
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

17 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

17 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.

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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)

17 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

17 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

17 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

17 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)

17 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

17 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

17 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

17 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)

17 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

17 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.

17 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

17 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)

17 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)

17 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

17 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

17 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)

17 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

17 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

17 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)

17 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

17 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.

18 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

18 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.

18 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

18 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)

18 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

18 months agoUpdate version number to 2.42 binutils-2_42
Nick Clifton [Mon, 29 Jan 2024 14:51:43 +0000 (14:51 +0000)] 
Update version number to 2.42

18 months agox86: testsuite: scfi: adjust COFI testcase and gas: scfi: untraceable control flow...
Indu Bhagat [Mon, 29 Jan 2024 14:22:06 +0000 (14:22 +0000)] 
x86: testsuite: scfi: adjust COFI testcase and  gas: scfi: untraceable control flow should be a hard error

18 months agoUpdated French translations for GOLD and LD
Nick Clifton [Mon, 29 Jan 2024 11:31:52 +0000 (11:31 +0000)] 
Updated French translations for GOLD and LD

18 months agoLoongArch: update test cases about TLS
Nick Clifton [Mon, 29 Jan 2024 11:22:39 +0000 (11:22 +0000)] 
LoongArch: update test cases about TLS

18 months agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Jan 2024 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

18 months agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Jan 2024 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

18 months agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Jan 2024 00:01:30 +0000 (00:01 +0000)] 
Automatic date update in version.in

18 months agoBackport commits 969f5c0e1 (LoongArch: gas: Add support for s9 register) and a0aa6f4a...
mengqinggang [Fri, 26 Jan 2024 10:50:57 +0000 (10:50 +0000)] 
Backport commits 969f5c0e1 (LoongArch: gas: Add support for s9 register) and a0aa6f4ab (LoongArch: ld: Add support for TLS LE symbol with addend) to 2.42 branch.

18 months agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Jan 2024 00:01:13 +0000 (00:01 +0000)] 
Automatic date update in version.in

18 months agogas: Update NEWS
Andrew Carlotti [Fri, 19 Jan 2024 17:15:04 +0000 (17:15 +0000)] 
gas: Update NEWS

Groups entries by architecture, and update AArch64 content.

18 months agoaarch64: Update Architecture Extensions documentation
Andrew Carlotti [Mon, 15 Jan 2024 07:26:53 +0000 (07:26 +0000)] 
aarch64: Update Architecture Extensions documentation

Restructure the architecture extensions table, add a new table for architecture
version dependencies, add missing architecture extensions, and improve some
extension descriptions.

18 months agoLoongArch: gas: Start a new frag after instructions that can be relaxed
mengqinggang [Thu, 18 Jan 2024 11:03:11 +0000 (19:03 +0800)] 
LoongArch: gas: Start a new frag after instructions that can be relaxed

For R_LARCH_TLS_{LE_HI20_R,LE_ADD_R,LD_PC_HI20,GD_PC_HI20, DESC_PC_HI20}
relocations, start a new frag to get correct eh_frame Call Frame Information
FDE DW_CFA_advance_loc info.

18 months agoLoongArch: gas: Don't define LoongArch .align
mengqinggang [Sun, 1 Oct 2023 07:29:44 +0000 (15:29 +0800)] 
LoongArch: gas: Don't define LoongArch .align

Gcc may generate "\t.align\t%d,54525952,4\n" before commit
b20c7ee066cb7d952fa193972e8bc6362c6e4063. To write 54525952 (NOP) to object
file, we call s_align_ptwo (-4). It result in alignment padding must be a
multiple of 4 if .align has second parameter.

Use default s_align_ptwo for .align.

18 months agoLoongArch: Fix some test failures about TLS desc and TLS relaxation
Xi Ruoyao [Fri, 19 Jan 2024 16:38:24 +0000 (00:38 +0800)] 
LoongArch: Fix some test failures about TLS desc and TLS relaxation

There are two issues causing 11 test failures:

1. The TLS desc tests are matching the entire disassemble of a linked
   executable.  But if ld is configured --enable-default-hash-style=gnu
   (note that most modern distros use this option), the layout of the
   linked executables will be different and the immediate operands in
   the linked executables will also be different.  So we add
   "--hash-style=both" for these tests to cancel the effect of
   --enable-default-hash-style=gnu, like [x86_64 mark-plt tests].
2. By default objdump disassemble uses [pseudo-instructions] so "addi.w"
   is outputed as "li.w", causing mismatches in TLS relaxation tests.
   We can turn off the pseudo-instruction usage in objdump using "-M
   no-aliases" to fix them.

[x86_64 mark-plt tests]: 16666ccc91295d1568c5c2cb0e7600694840dfd9
[pseudo-instructions]: 17f9439038257b1de0c130a416a9a7645c653cb0

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
18 months agoLoongArch: Do not emit R_LARCH_RELAX for two register macros
mengqinggang [Wed, 10 Jan 2024 01:55:13 +0000 (09:55 +0800)] 
LoongArch: Do not emit R_LARCH_RELAX for two register macros

For two register macros (e.g. la.local $t0, $t1, symbol) used in extreme code
model, do not emit R_LARCH_RELAX relocations.

18 months agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Jan 2024 00:03:06 +0000 (00:03 +0000)] 
Automatic date update in version.in

18 months agoaarch64: Eliminate unused variable warnings with -DNDEBUG
Andrew Carlotti [Tue, 23 Jan 2024 18:22:12 +0000 (18:22 +0000)] 
aarch64: Eliminate unused variable warnings with -DNDEBUG

18 months agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Jan 2024 00:02:16 +0000 (00:02 +0000)] 
Automatic date update in version.in

18 months agoaarch64: Include +predres2 in -march=armv8.9-a
Andrew Carlotti [Wed, 17 Jan 2024 12:37:15 +0000 (12:37 +0000)] 
aarch64: Include +predres2 in -march=armv8.9-a

This matches the dependencies in the architecture, in LLVM, and even in the
original Binutils commit message that mistakenly included it only in armv9.4-a.

18 months ago[PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
Xi Ruoyao [Tue, 23 Jan 2024 15:59:12 +0000 (15:59 +0000)] 
[PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42

18 months agox86/APX: also amend the PUSH2/POP2 testcase
Jan Beulich [Mon, 22 Jan 2024 07:52:30 +0000 (08:52 +0100)] 
x86/APX: also amend the PUSH2/POP2 testcase

Commit f530d5f1bab6 ("Update x86/APX: VROUND{P,S}{S,D} can generally be
encoded") took care of only half of the remaining issue. Add #pass here
as well.

18 months agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Jan 2024 00:02:50 +0000 (00:02 +0000)] 
Automatic date update in version.in

18 months agoFix 31252 gprofng causes testsuite parallel jobs fail
Vladimir Mezentsev [Sat, 20 Jan 2024 02:40:21 +0000 (18:40 -0800)] 
Fix 31252 gprofng causes testsuite parallel jobs fail

Before running our tests, we made a fake installation into ./tmpdir.
This installation changes libopcodes.la in the build area.
Gas testing may fail if gas and gprofng tests are run in parallel.

I create a script to run gprofng. Inside this script, LD_LIBRARY_PATH,
GPROFNG_SYSCONFDIR are set.
putenv_libcollector_ld_misc() first uses $GPROFNG_PRELOAD_LIBDIRS to create
directories for SP_COLLECTOR_LIBRARY_PATH ($SP_COLLECTOR_LIBRARY_PATH is used
to set up LD_PRELOAD).

gprofng/ChangeLog
2024-01-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/31252
PR gprofng/30808
* src/envsets.cc (putenv_libcollector_ld_misc): Use
$GPROFNG_PRELOAD_LIBDIRS first to build SP_COLLECTOR_LIBRARY_PATH.
* testsuite/config/default.exp: Create a script to run gprofng.
* testsuite/lib/display-lib.exp: Fix typo.

18 months agoUpdated Serbian translations for th bfd, gold and opcodes directories
Nick Clifton [Mon, 22 Jan 2024 17:26:00 +0000 (17:26 +0000)] 
Updated Serbian translations for th bfd, gold and opcodes directories

18 months agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Jan 2024 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

18 months agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Jan 2024 00:01:19 +0000 (00:01 +0000)] 
Automatic date update in version.in

18 months agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Jan 2024 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

18 months agoUpdate x86/APX: VROUND{P,S}{S,D} can generally be encoded
H.J. Lu [Fri, 19 Jan 2024 14:42:20 +0000 (06:42 -0800)] 
Update x86/APX: VROUND{P,S}{S,D} can generally be encoded

Append "#pass" to APX tests for targets which pad text sections with NOPs.

* testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d: Append
"#pass".
* testsuite/gas/i386/x86-64-apx-evex-promoted.d: Likewise.

(cherry picked from commit f530d5f1bab6eb5adc65f422ef811fb278a21a4b)

18 months agox86/APX: VROUND{P,S}{S,D} can generally be encoded
Jan Beulich [Fri, 19 Jan 2024 09:18:32 +0000 (10:18 +0100)] 
x86/APX: VROUND{P,S}{S,D} can generally be encoded

VRNDSCALE{P,S}{S,D} is the AVX512 generalization of these AVX insns. As
long as the immediate has the top 4 bits clear, they are equivalent to
the earlier VEX-encoded insns, and hence can be used to permit use of
eGPR-s in the memory operand. Since this is the normal way of using
these insns, also alter the resulting diagnostic to complain about the
immediate, not the eGPR use.

18 months agox86/APX: be consistent with insn suffixes
Jan Beulich [Fri, 19 Jan 2024 09:17:44 +0000 (10:17 +0100)] 
x86/APX: be consistent with insn suffixes

When there's a suitably disambiguating register operand, suffixes are
generally omitted (unless in suffix-always mode). All NDD insns have a
suitable register operand, so they shouldn't have suffixes by default.

18 months agox86: support APX forms of U{RD,WR}MSR
Jan Beulich [Fri, 19 Jan 2024 09:16:00 +0000 (10:16 +0100)] 
x86: support APX forms of U{RD,WR}MSR

This was missed in 6177c84d5edc ("Support APX GPR32 with extend evex
prefix").

18 months agoAdd multilib.am to the list of top level files included in any release created by...
Nick Clifton [Fri, 19 Jan 2024 11:45:44 +0000 (11:45 +0000)] 
Add multilib.am to the list of top level files included in any release created by the src-release.sh script

18 months agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Jan 2024 00:02:36 +0000 (00:02 +0000)] 
Automatic date update in version.in

18 months agoLoongArch: Adapt R_LARCH_{PCALA,GOT,TLS_IE,TLS_DESC}64_* handling per psABI v2.30
Xi Ruoyao [Tue, 16 Jan 2024 07:00:16 +0000 (15:00 +0800)] 
LoongArch: Adapt R_LARCH_{PCALA,GOT,TLS_IE,TLS_DESC}64_* handling per psABI v2.30

In LoongArch psABI v2.30, an offset (-8 for LO20 and -12 for HI12)
should be applied on PC for these reloc types to avoid wrong relocation
when the instruction sequence crosses a page boundary.

The lld linker has already adapted the change.  Make it for the bfd
linker too.

Link: https://github.com/loongson/la-abi-specs/releases/v2.30
Link: https://github.com/loongson-community/discussions/issues/17
Link: https://github.com/llvm/llvm-project/pull/73387
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
18 months agoUpdated translations for various sub-directories
Nick Clifton [Thu, 18 Jan 2024 11:22:36 +0000 (11:22 +0000)] 
Updated translations for various sub-directories

18 months agoPR30824 internal error with -z pack-relative-relocs
Alan Modra [Tue, 16 Jan 2024 00:36:23 +0000 (11:06 +1030)] 
PR30824 internal error with -z pack-relative-relocs

This corrects a counting problem, where prior to relocate_section relr
encoded relative relocs were allowed when it was known they were on
even boundaries, but relocate_section can only put relative relocs
(non-relr) on eight byte boundaries.

PR 30824
* elf64-ppc.c (RELR_ALIGN): Define, use throughout.
(maybe_relr): New function, use throughout.

(cherry picked from commit f91074ebd8dc8077c9c778a42360e77a636dce5e)

18 months agoUpdate x86-64: Add -z mark-plt and -z nomark-plt
H.J. Lu [Wed, 17 Jan 2024 16:03:29 +0000 (08:03 -0800)] 
Update x86-64: Add -z mark-plt and -z nomark-plt

Pass --hash-style=both to ld for -z mark-plt tests to support linker
configured with --enable-default-hash-style=gnu.

* testsuite/ld-x86-64/mark-plt-1b-x32.d: Pass --hash-style=both
to ld.
* testsuite/ld-x86-64/mark-plt-1b.d: Likewise.
* testsuite/ld-x86-64/mark-plt-1d-x32.d: Likewise.
* testsuite/ld-x86-64/mark-plt-1d.d: Likewise.

(cherry picked from commit 16666ccc91295d1568c5c2cb0e7600694840dfd9)

18 months agoImport gcc commit 65388b28656d65595bdaf191df85af81c35ca63 which adds support for...
Nick Clifton [Wed, 17 Jan 2024 12:08:31 +0000 (12:08 +0000)] 
Import gcc commit 65388b28656d65595bdaf191df85af81c35ca63 which adds support for explicit object member function mangling.

18 months agox86-64: Skip SCFI tests for x32 targets
H.J. Lu [Mon, 15 Jan 2024 15:31:29 +0000 (07:31 -0800)] 
x86-64: Skip SCFI tests for x32 targets

Since SCFI isn't supported on x32:

Fatal error: SCFI is not supported for this ABI

skip SCFI tests for x32 targets.

PR gas/31245
* testsuite/gas/scfi/x86_64/scfi-x86-64.exp: Skip for x32
targets.

(cherry picked from commit 7bd344dd0e0469a93cbbf50f797155278cb76a0b)

18 months agofix typo
Nick Clifton [Mon, 15 Jan 2024 15:14:03 +0000 (15:14 +0000)] 
fix typo

18 months agoUpdate version number and regenerate configure files
Nick Clifton [Mon, 15 Jan 2024 15:10:12 +0000 (15:10 +0000)] 
Update version number and regenerate configure files

18 months agoAdd markers for 2.42 branch
Nick Clifton [Mon, 15 Jan 2024 14:42:15 +0000 (14:42 +0000)] 
Add markers for 2.42 branch

18 months agoUpdate branch/release creation documentation
Nick Clifton [Mon, 15 Jan 2024 14:21:37 +0000 (14:21 +0000)] 
Update branch/release creation documentation

18 months agoaarch64: rcpc3: Regenerate aarch64-*-2.c files
Victor Do Nascimento [Mon, 15 Jan 2024 13:02:36 +0000 (13:02 +0000)] 
aarch64: rcpc3: Regenerate aarch64-*-2.c files

18 months agoaarch64: rcpc3: Add FP load/store insns
Victor Do Nascimento [Wed, 10 Jan 2024 19:20:05 +0000 (19:20 +0000)] 
aarch64: rcpc3: Add FP load/store insns

Along with the relevant unit-tests, this adds the following rcpc3
instructions:

  STL1  { <Vt>.D }[<index>], [<Xn|SP>]
  LDAP1 { <Vt>.D }[<index>], [<Xn|SP>]

  LDAPUR <Bt>, [<Xn|SP>{, #<simm>}]
  LDAPUR <Ht>, [<Xn|SP>{, #<simm>}]
  LDAPUR <St>, [<Xn|SP>{, #<simm>}]
  LDAPUR <Dt>, [<Xn|SP>{, #<simm>}]
  LDAPUR <Qt>, [<Xn|SP>{, #<simm>}]

  STLUR <Bt>, [<Xn|SP>{, #<simm>}]
  STLUR <Ht>, [<Xn|SP>{, #<simm>}]
  STLUR <St>, [<Xn|SP>{, #<simm>}]
  STLUR <Dt>, [<Xn|SP>{, #<simm>}]
  STLUR <Qt>, [<Xn|SP>{, #<simm>}]

with `#<simm>' taking on a signed 8-bit integer value in the range
[-256,255] and `index' the values 0 or 1.

Co-authored-by: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
18 months agoaarch64: rcpc3: Add integer load/store insns
Victor Do Nascimento [Thu, 4 Jan 2024 14:06:38 +0000 (14:06 +0000)] 
aarch64: rcpc3: Add integer load/store insns

Along with the relevant unit tests and updates to the existing
regression tests, this adds support for the following novel rcpc3
insns:

  LDIAPP <Wt1>, <Wt2>, [<Xn|SP>]
  LDIAPP <Wt1>, <Wt2>, [<Xn|SP>], #8
  LDIAPP <Xt1>, <Xt2>, [<Xn|SP>]
  LDIAPP <Xt1>, <Xt2>, [<Xn|SP>], #16

  STILP <Wt1>, <Wt2>, [<Xn|SP>]
  STILP <Wt1>, <Wt2>, [<Xn|SP>, #-8]!
  STILP <Xt1>, <Xt2>, [<Xn|SP>]
  STILP <Xt1>, <Xt2>, [<Xn|SP>, #-16]!

  LDAPR <Wt>, [<Xn|SP>], #4
  LDAPR <Xt>, [<Xn|SP>], #8

  STLR <Wt>, [<Xn|SP>, #-4]!
  STLR <Xt>, [<Xn|SP>, #-8]!

18 months agoaarch64: rcpc3: Define RCPC3_INSN macro
Victor Do Nascimento [Thu, 4 Jan 2024 14:04:40 +0000 (14:04 +0000)] 
aarch64: rcpc3: Define RCPC3_INSN macro

This patch adds the necessary macro for encoding FEAT_RCPC3-dependent
instructions in Binutils.

18 months agoaarch64: rcpc3: add support in general_constraint_met_p
Victor Do Nascimento [Tue, 9 Jan 2024 10:04:11 +0000 (10:04 +0000)] 
aarch64: rcpc3: add support in general_constraint_met_p

Given the introduction of the new address operand types for rcpc3
instructions, this patch adds the necessary logic to teach
`general_constraint_met_p` how to proper handle these.

18 months agoaarch64: rcpc3: New RCPC3_ADDR operand types
Victor Do Nascimento [Fri, 5 Jan 2024 17:26:09 +0000 (17:26 +0000)] 
aarch64: rcpc3: New RCPC3_ADDR operand types

The particular choices of address indexing, along with their encoding
for RCPC3 instructions lead to the requirement of a new set of operand
descriptions, along with the relevant inserter/extractor set.

That is, for the integer load/stores, there is only a single valid
indexing offset quantity and offset mode is allowed - The value is
always equivalent to the amount of data read/stored by the
operation and the offset is post-indexed for Load-Acquire RCpc, and
pre-indexed with writeback for Store-Release insns.

This indexing quantity/mode pair is selected by the setting of a
single bit in the instruction. To represent these insns, we add the
following operand types:

  - AARCH64_OPND_RCPC3_ADDR_OPT_POSTIND
  - AARCH64_OPND_RCPC3_ADDR_OPT_PREIND_WB

In the case of loads and stores involving SIMD/FP registers, the
optional offset is encoded as an 8-bit signed immediate, but neither
post-indexing or pre-indexing with writeback is available.  This
created the need for an operand type similar to
AARCH64_OPND_ADDR_OFFSET, with the difference that FLD_index should
not be checked.

We thus introduce the AARCH64_OPND_RCPC3_ADDR_OFFSET operand, a
variant of AARCH64_OPND_ADDR_OFFSET, w/o the FLD_index bitfield.

18 months agoaarch64: rcpc3: Define address operand fields and inserter/extractors
Victor Do Nascimento [Fri, 5 Jan 2024 17:27:04 +0000 (17:27 +0000)] 
aarch64: rcpc3: Define address operand fields and inserter/extractors

Beyond the need to encode any registers involved in data transfer and
the address base register for load/stores, it is necessary to specify
the data register addressing mode and whether the address register is
to be pre/post-indexed, whereby loads may be post-indexed and stores
pre-indexed with write-back.

The use of a single bit to specify both the indexing mode and indexing
value requires a novel function be written to accommodate this for
address operand insertion in assembly and another for extraction in
disassembly, along with the definition of two insn fields for use with
these instructions.

This therefore defines the following functions:

  - aarch64_ins_rcpc3_addr_opt_offset
  - aarch64_ins_rcpc3_addr_offset
  - aarch64_ext_rcpc3_addr_opt_offset
  - aarch64_ext_rcpc3_addr_offset

It extends the `do_special_{encoding|decoding}' functions and defines
two rcpc3 instruction fields:

  - FLD_opc2
  - FLD_rcpc3_size