aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ld: pass -g for ld-elf testsgentoo/binutils-2.42-6gentoo/binutils-2.42Sam James2024-06-292-2/+2
| | | | | | | | | | | | | | | | | | The "DWARF parse during linker error" and "Build warn libbar.so" tests require debug information. configure defaults to "-O2 -g" but if overriding *FLAGS when building tests, this might be lost. Explicitly pass -g given these tests require it. Originally reported downstream in Gentoo at https://bugs.gentoo.org/934149. ld/ * testsuite/ld-elf/dwarf.exp: Pass -g for "DWARF parse during linker error". * testsuite/ld-elf/shared.exp: Ditto for "Build warn libbar.so". (cherry picked from commit 17c78a23491ce76fd6d21cdbf2db3c0cf02145e0) (cherry picked from commit 68ae8e2a84993ab77fdc48a61e1875cdc9db740a)
* Revert "Gentoo: Pass --hash-style=sysv to ld in the testsuite"gentoo/binutils-2.42-5Andreas K. Hüttel2024-06-292-15/+3
| | | | | | Hopefully not needed anymore This reverts commit 936328451bc6cc46a3077a9b4eece4033edd5eec.
* Revert "Gentoo: gold/ld: add support for poisoned system directories"Andreas K. Hüttel2024-06-2911-148/+0
| | | | | | Let's try without. This reverts commit 1f5ed3e896eb80e040028d5b81d84cd6ffc97721.
* aarch64: Enable +cssc for armv8.9-agentoo/binutils-2.42-4Andrew Carlotti2024-06-292-0/+2
| | | | | | FEAT_CSSC is mandatory in the architecture from Armv8.9. (cherry picked from commit a1e3cb45c676da0f5be0237a05e2af3542d62ace)
* PR31898 bug in processing DW_RLE_startx_endxAlan Modra2024-06-291-4/+4
| | | | | | | | | PR 31898 * dwarf.c (display_debug_rnglists_list): Correct fetch of "end" indexed address. Remove excess parens. (cherry picked from commit 1b19566b18a1208f84b89029785a1e93a6544514) (cherry picked from commit 6c360d376628d49a1403e5566fb057a207fb5c32)
* aarch64: Remove asserts from operand qualifier decodersNick Clifton2024-06-294-18/+87
| | | | | | PR31595 (cherry picked from commit bfda03eed33330bef89732c2484f40410b13a83d)
* Re: PR26978, Inconsistency for strong foo@v1 and weak foo@@v1Alan Modra2024-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit 6224493e457e72b11818c87cdc112bdb0fee5f81)
* hppa: Implement PA 2.0 symbolic relocations for long displacementsJohn David Anglin2024-04-073-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (cherry picked from commit d125f9675372b1ae01ceb1893c06ccb27bc7bf22)
* x86/APX: Remove KEYLOCKER and SHA promotions from EVEX MAP4Cui, Lili2024-04-079-446/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (cherry picked from commit 884fb5373a1463b97845f15d94abf6aaa911347b)
* aarch64: Remove B16B16, SVE2p1 and SME2p1Andrew Carlotti2024-04-076-16/+9
| | | | | | | | | 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. (cherry picked from commit d816fda3cbd83ff5c2700bf5f001d59fcaf75985)
* Re: Move bfd_init to bfd.cAlan Modra2024-04-071-1/+0
| | | | | | | | | | | 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) (cherry picked from commit cb11047e34adf6d71689a828f3ee0b0d6a0f8938)
* print cached error messages using _bfd_error_handlerAlan Modra2024-04-071-8/+1
| | | | | | | | * format.c (print_warnmsg): Use _bfd_error_handler to print cached messages. (cherry picked from commit bd8d76258f86f93b20e6bd94f58033a49eb0d3ec) (cherry picked from commit 818bcf40efbee8784511ee8951c4c78328462582)
* aarch64: Fix the 2nd operand in gcsstr and gcssttr instructions.Srinath Parvathaneni2024-04-074-51/+51
| | | | | | | | The assembler wrongly expects plain register name instead of memory-form 2nd operand for gcsstr and gcssttr instructions. This patch fixes the issue. (cherry picked from commit 831be495ef18c2df5964fbd5dc7c6c16fc275d13)
* x86: Display -msse-check= default as noneH.J. Lu2024-04-071-1/+1
| | | | | | | | | | | | 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) (cherry picked from commit 553c7f61b74badf91df484450944675efd9cd485)
* PowerPC: Add support for Power11 optionsgentoo/binutils-2.42-3Peter Bergner2024-02-164-6/+22
| | | | | | | | | | | | | | | | 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) (cherry picked from commit 4f7d1d2d5ec2fa5070dc24503acd2961c5993a71)
* x86-64: Add R_X86_64_CODE_6_GOTTPOFFH.J. Lu2024-02-1615-45/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit 3c1f1c35784f4062455690329a0e7eaa61dd7c79)
* x86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}Jan Beulich2024-02-162-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. (cherry picked from commit c426c8e307afa0c285bf63862be8c3f1e4ce2f1f)
* PR31208, strip can break ELF alignment requirementsAlan Modra2024-02-161-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) (cherry picked from commit 78f9e9faaa41d628170f6047c3e032a67f9e829d)
* PR 31283 windmc: Parse input correctly on big endian hostsRichard W.M. Jones2024-02-164-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) (cherry picked from commit e19278f72bdc92e720b2d6c144ddedff5821b56c)
* Link x86-64 mark-plt-1.so with --no-as-neededAlan Modra2024-02-161-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) (cherry picked from commit b76b89831165cb28751d57d14de5bb6210938d82)
* LoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtabXi Ruoyao2024-02-163-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) (cherry picked from commit e92e2d654bf3140f81466c6752581d6da8da1d67)
* x86: Disallow instructions with length > 15 bytesH.J. Lu2024-02-166-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) (cherry picked from commit 42cde237366398f6e318232f4ce080bef42f0371)
* Mention support for AMD/znver5 in GASNick Clifton2024-02-161-0/+2
| | | | (cherry picked from commit ffb78e62bc1ebc0856ac08224d47846b3d9d52b5)
* PR31124: Addendum: Remove PROVIDE of __flmap_init_label, __flmap.Georg-Johann Lay2024-02-161-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. (cherry picked from commit 2fad36c3f553d103fcd0b75abd7a17da89b99864)
* gas: scfi: add missing ginsn-cofi-1 testcase filesgentoo/binutils-2.42-2Indu Bhagat2024-01-302-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. (cherry picked from commit 48942a586ebc056bd059d3f63a5eed3a2fa46ab3)
* PR31314, chew crashing on use of uninitialized valueAlan Modra2024-01-302-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) (cherry picked from commit 6d329337f6701fe090602c6f8ca373250eb91b82)
* Apply a similar libiberty fix as in 7d53105d for libopcodes and libgprofnggentoo/binutils-2.42-1Andreas K. Hüttel2024-01-294-6/+8
| | | | | | Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29042 Bug: https://bugs.gentoo.org/834720 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Gentoo: XFAIL 15 broken ld.gold testsAndreas K. Hüttel2024-01-292-4/+18
| | | | | | | | | | It seems like either the tests or ld.gold in general cannot handle compilers built with --enable-default-pie. No fix yet, so let's ignore these test failures for the moment. For details see the linked bugs. Bug: https://bugs.gentoo.org/684046 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22755 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27303
* Gentoo: Give also libctf optionally a gentoo-specific soversionAndreas K. Hüttel2024-01-294-2/+62
|
* Gentoo: Pass --hash-style=sysv to ld in the testsuiteAndreas K. Hüttel2024-01-292-3/+15
|
* Gentoo: add --with-extra-soversion-suffix= optionSergei Trofimovich2024-01-294-0/+29
| | | | | | | | | | | | | | | | | | | | | | | --with-extra-soversion-suffix= will allow Gentoo to distinct libbfd.so and libopcodes.so to have more precise SONAME. Today --enable-targets=all and --enable-64-bit-bfd change libbfd.so ABI: --enable-targets=all adds new symbols to the library --enable-64-bit-bfd modifies BFD_ARCH_SIZE default and changes sizes of integer parameters and fields to most APIs. --with-extra-soversion-suffix= will allow Gentoo to inject additional keys into SONAME to indicate ABI change and avoid hard to diagnose crashes when user reinstalls libbfd.so built with different flags (see https://bugs.gentoo.org/663690). Bug: https://bugs.gentoo.org/666100 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org>
* Gentoo: libiberty: install PIC version of libiberty.aMike Frysinger2024-01-291-0/+1
| | | | | | | | | | | | | This will install a PIC version of libiberty.a by overwriting the non-PIC version of libiberty.a while compiling. We do this because there is no shared version of libiberty for random apps to link against which means if someone wants to use this in a shared library or PIE, they're out of luck. It's arguable whether people should be able to use this in a shared lib, but usage in PIE should be fine. You could argue that this penalizes the non-PIE users, but the counter point is that people using this library in general are fairly low, and we'd rather have things work for all of them. (cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9)
* Gentoo: gold/ld: add support for poisoned system directoriesMike Frysinger2024-01-2911-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | This is based on the old CodeSourcery patch written by Joseph Myers to add support to the link for detecting & rejecting bad -L paths when using a cross-compiler. The differences here: * The command line flags are always available. * We can turn on & off the warning via the command line. * The configure option controls the default warning behavior. * Add support for gold. It is not currently upstream, nor has it been submitted at all. There are no plans to do so currently either. BUG=chromium:488360 TEST=`cbuildbot chromiumos-sdk` passes # tests arm/amd64/mipsel/x86 TEST=`cbuildbot panther_moblab-full whirlwind-release` pass TEST=`cbuildbot {x32,arm64}-generic-full` has no new failures TEST=x86_64-cros-linux-gnu-ld throws warnings when using -L/lib (gold & bfd) Reviewed-on: https://chromium-review.googlesource.com/272083 (cherry picked from commit f92dbf35c00ab13cee36f6be8ae5ca46454d9000) Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org> Ported to binutils 2.39 by WANG Xuerui <xen0n@gentoo.org>
* Set version number to 2.42.0 and re-enable developmentNick Clifton2024-01-2910-65/+65
|
* Update version number to 2.42binutils-2_42Nick Clifton2024-01-2922-427/+182892
|
* x86: testsuite: scfi: adjust COFI testcase and gas: scfi: untraceable ↵Indu Bhagat2024-01-296-37/+4
| | | | control flow should be a hard error
* Updated French translations for GOLD and LDNick Clifton2024-01-292-1598/+1682
|
* LoongArch: update test cases about TLSNick Clifton2024-01-2917-65/+126
|
* Automatic date update in version.inGDB Administrator2024-01-291-1/+1
|
* Automatic date update in version.inGDB Administrator2024-01-281-1/+1
|
* Automatic date update in version.inGDB Administrator2024-01-271-1/+1
|
* Backport commits 969f5c0e1 (LoongArch: gas: Add support for s9 register) and ↵mengqinggang2024-01-2610-5/+54
| | | | a0aa6f4ab (LoongArch: ld: Add support for TLS LE symbol with addend) to 2.42 branch.
* Automatic date update in version.inGDB Administrator2024-01-261-1/+1
|
* gas: Update NEWSAndrew Carlotti2024-01-251-23/+37
| | | | Groups entries by architecture, and update AArch64 content.
* aarch64: Update Architecture Extensions documentationAndrew Carlotti2024-01-251-116/+142
| | | | | | Restructure the architecture extensions table, add a new table for architecture version dependencies, add missing architecture extensions, and improve some extension descriptions.
* LoongArch: gas: Start a new frag after instructions that can be relaxedmengqinggang2024-01-253-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.
* LoongArch: gas: Don't define LoongArch .alignmengqinggang2024-01-254-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.
* LoongArch: Fix some test failures about TLS desc and TLS relaxationXi Ruoyao2024-01-255-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>
* LoongArch: Do not emit R_LARCH_RELAX for two register macrosmengqinggang2024-01-254-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.
* Automatic date update in version.inGDB Administrator2024-01-251-1/+1
|