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 7a6a03c499)
In https://sourceware.org/pipermail/binutils/2007-August/053261.html
(git commit 3dea8fca8b) 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 7f26d260ef)
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 3f8f9745c7)
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 60c95acdac)
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 029e52bac7)
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.
Previous commit a58dc5427f intended to bring the following two commits
from master branch:
91cdbed4d7 gas: scfi: untraceable control flow should be a hard error
16cbeae1b2 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.
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.