| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Hopefully not needed anymore
This reverts commit 936328451bc6cc46a3077a9b4eece4033edd5eec.
|
|
|
|
|
|
| |
Let's try without.
This reverts commit 1f5ed3e896eb80e040028d5b81d84cd6ffc97721.
|
|
|
|
|
|
| |
FEAT_CSSC is mandatory in the architecture from Armv8.9.
(cherry picked from commit a1e3cb45c676da0f5be0237a05e2af3542d62ace)
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
PR31595
(cherry picked from commit bfda03eed33330bef89732c2484f40410b13a83d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
* format.c (print_warnmsg): Use _bfd_error_handler to print
cached messages.
(cherry picked from commit bd8d76258f86f93b20e6bd94f58033a49eb0d3ec)
(cherry picked from commit 818bcf40efbee8784511ee8951c4c78328462582)
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit ffb78e62bc1ebc0856ac08224d47846b3d9d52b5)
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
| |
control flow should be a hard error
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
a0aa6f4ab (LoongArch: ld: Add support for TLS LE symbol with addend) to 2.42 branch.
|
| |
|
|
|
|
| |
Groups entries by architecture, and update AArch64 content.
|
|
|
|
|
|
| |
Restructure the architecture extensions table, add a new table for architecture
version dependencies, add missing architecture extensions, and improve some
extension descriptions.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
For two register macros (e.g. la.local $t0, $t1, symbol) used in extreme code
model, do not emit R_LARCH_RELAX relocations.
|
| |
|