aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-09x86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}Jan Beulich2-6/+6
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.
2024-02-09Automatic date update in version.inGDB Administrator1-1/+1
2024-02-09PR31208, strip can break ELF alignment requirementsAlan Modra1-1/+1
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)
2024-02-08PR 31283 windmc: Parse input correctly on big endian hostsRichard W.M. Jones4-4/+259
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)
2024-02-08Automatic date update in version.inGDB Administrator1-1/+1
2024-02-07Automatic date update in version.inGDB Administrator1-1/+1
2024-02-06Link x86-64 mark-plt-1.so with --no-as-neededAlan Modra1-1/+1
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)
2024-02-06Automatic date update in version.inGDB Administrator1-1/+1
2024-02-05Automatic date update in version.inGDB Administrator1-1/+1
2024-02-04LoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtabXi Ruoyao3-0/+12
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)
2024-02-04Automatic date update in version.inGDB Administrator1-1/+1
2024-02-03Automatic date update in version.inGDB Administrator1-1/+1
2024-02-02x86: Disallow instructions with length > 15 bytesH.J. Lu6-32/+40
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)
2024-02-02Automatic date update in version.inGDB Administrator1-1/+1
2024-02-01Automatic date update in version.inGDB Administrator1-1/+1
2024-01-31Mention support for AMD/znver5 in GASNick Clifton1-0/+2
2024-01-31PR31124: Addendum: Remove PROVIDE of __flmap_init_label, __flmap.Georg-Johann Lay1-3/+3
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.
2024-01-31Automatic date update in version.inGDB Administrator1-1/+1
2024-01-30gas: scfi: add missing ginsn-cofi-1 testcase filesIndu Bhagat2-0/+58
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.
2024-01-30Automatic date update in version.inGDB Administrator1-1/+1
2024-01-30PR31314, chew crashing on use of uninitialized valueAlan Modra2-2/+1
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)
2024-01-29Set version number to 2.42.0 and re-enable developmentNick Clifton10-65/+65
2024-01-29Update version number to 2.42binutils-2_42Nick Clifton22-427/+182892
2024-01-29x86: testsuite: scfi: adjust COFI testcase and gas: scfi: untraceable ↵Indu Bhagat6-37/+4
control flow should be a hard error
2024-01-29Updated French translations for GOLD and LDNick Clifton2-1598/+1682
2024-01-29LoongArch: update test cases about TLSNick Clifton17-65/+126
2024-01-29Automatic date update in version.inGDB Administrator1-1/+1
2024-01-28Automatic date update in version.inGDB Administrator1-1/+1
2024-01-27Automatic date update in version.inGDB Administrator1-1/+1
2024-01-26Backport commits 969f5c0e1 (LoongArch: gas: Add support for s9 register) and ↵mengqinggang10-5/+54
a0aa6f4ab (LoongArch: ld: Add support for TLS LE symbol with addend) to 2.42 branch.
2024-01-26Automatic date update in version.inGDB Administrator1-1/+1
2024-01-25gas: Update NEWSAndrew Carlotti1-23/+37
Groups entries by architecture, and update AArch64 content.
2024-01-25aarch64: Update Architecture Extensions documentationAndrew Carlotti1-116/+142
Restructure the architecture extensions table, add a new table for architecture version dependencies, add missing architecture extensions, and improve some extension descriptions.
2024-01-25LoongArch: gas: Start a new frag after instructions that can be relaxedmengqinggang3-5/+93
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.
2024-01-25LoongArch: gas: Don't define LoongArch .alignmengqinggang4-13/+7
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.
2024-01-25LoongArch: Fix some test failures about TLS desc and TLS relaxationXi Ruoyao5-11/+11
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>
2024-01-25LoongArch: Do not emit R_LARCH_RELAX for two register macrosmengqinggang4-319/+311
For two register macros (e.g. la.local $t0, $t1, symbol) used in extreme code model, do not emit R_LARCH_RELAX relocations.
2024-01-25Automatic date update in version.inGDB Administrator1-1/+1
2024-01-24aarch64: Eliminate unused variable warnings with -DNDEBUGAndrew Carlotti3-8/+8
2024-01-24Automatic date update in version.inGDB Administrator1-1/+1
2024-01-23aarch64: Include +predres2 in -march=armv8.9-aAndrew Carlotti1-2/+2
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.
2024-01-23[PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42Xi Ruoyao2-0/+38
2024-01-23x86/APX: also amend the PUSH2/POP2 testcaseJan Beulich2-0/+2
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.
2024-01-23Automatic date update in version.inGDB Administrator1-1/+1
2024-01-22Fix 31252 gprofng causes testsuite parallel jobs failVladimir Mezentsev3-20/+57
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.
2024-01-22Updated Serbian translations for th bfd, gold and opcodes directoriesNick Clifton3-1714/+1955
2024-01-22Automatic date update in version.inGDB Administrator1-1/+1
2024-01-21Automatic date update in version.inGDB Administrator1-1/+1
2024-01-20Automatic date update in version.inGDB Administrator1-1/+1
2024-01-19Update x86/APX: VROUND{P,S}{S,D} can generally be encodedH.J. Lu2-0/+2
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)