f32da6f20f
* new .base64 pseudo-op, allowing base64 encoded data as strings * Intel APX: add support for CFCMOV, CCMP, CTEST, zero-upper, NF (APX_F now fully supported) * x86 Intel syntax now warns about more mnemonic suffixes * macros and .irp/.irpc/.rept bodies can use \+ to get at number of times the macro/body was executed * aarch64: support 'armv9.5-a' for -march, add support for LUT and LUT2 * s390: base register operand in D(X,B) and D(L,B) can now be omitted (ala 'D(X,)'); warn when register type doesn't match operand type (use option 'warn-regtype-mismatch=[strict|relaxed|no]' to adjust) * riscv: support various extensions: Zacas, Zcmp, Zfbfmin, Zvfbfmin, Zvfbfwma, Smcsrind/Sscsrind, XCvMem, XCvBi, XCvElw, XSfCease, all at version 1.0; remove support for assembly of privileged spec 1.9.1 (linking support remains) * arm: remove support for some old co-processors: Maverick and FPA * mips: '--trap' now causes either trap or breakpoint instructions to be emitted as per current ISA, instead of always using trap insn and failing when current ISA was incompatible with that * LoongArch: accept .option pseudo-op for fine-grained control of assembly code options; add support for DT_RELR * readelf: now displays RELR relocations in full detail; add -j/--display-section to show just those section(s) content according to their type * objdump/readelf now dump also .eh_frame_hdr (when present) when dumping .eh_frame * gprofng: add event types for AMD Zen3/Zen4 and Intel Ice Lake processors; add minimal support for riscv * linker: OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=471
64 lines
2.2 KiB
Diff
64 lines
2.2 KiB
Diff
Index: ld/lexsup.c
|
|
===================================================================
|
|
--- ld/lexsup.c.orig 2024-08-04 01:00:00.000000000 +0200
|
|
+++ ld/lexsup.c 2024-08-06 16:02:35.554864901 +0200
|
|
@@ -772,6 +772,9 @@ parse_args (unsigned argc, char **argv)
|
|
}
|
|
}
|
|
|
|
+ optarg = "relro";
|
|
+ ldemul_handle_option ('z');
|
|
+
|
|
last_optind = -1;
|
|
while (1)
|
|
{
|
|
Index: ld/testsuite/config/default.exp
|
|
===================================================================
|
|
--- ld/testsuite/config/default.exp.orig 2024-08-04 01:00:00.000000000 +0200
|
|
+++ ld/testsuite/config/default.exp 2024-08-06 16:05:13.860859897 +0200
|
|
@@ -39,7 +39,7 @@ if [info exists env(LD_UNDER_TEST)] {
|
|
}
|
|
|
|
if ![info exists ld] then {
|
|
- set ld [findfile $base_dir/ld-new $base_dir/ld-new [transform ld]]
|
|
+ set ld "[findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -znorelro"
|
|
}
|
|
|
|
if ![info exists as] then {
|
|
@@ -92,7 +92,7 @@ if {[info exists ld_testsuite_bindir]} {
|
|
}
|
|
catch "exec ln -s ld tmpdir/ld/collect-ld" status
|
|
catch "exec ln -s ../../../gas/as-new tmpdir/ld/as" status
|
|
- set gcc_B_opt "-B[pwd]/tmpdir/ld/"
|
|
+ set gcc_B_opt "-B[pwd]/tmpdir/ld/ -Wl,-z,norelro"
|
|
}
|
|
|
|
# load the linker path
|
|
@@ -343,7 +343,7 @@ if ![info exists ELFEDIT] then {
|
|
}
|
|
|
|
if ![info exists LD] then {
|
|
- set LD [findfile $base_dir/ld-new ./ld-new [transform ld]]
|
|
+ set LD "[findfile $base_dir/ld-new ./ld-new [transform ld]] -znorelro"
|
|
}
|
|
|
|
if ![info exists LDFLAGS] then {
|
|
Index: ld/testsuite/ld-bootstrap/bootstrap.exp
|
|
===================================================================
|
|
--- ld/testsuite/ld-bootstrap/bootstrap.exp.orig 2024-08-04 01:00:00.000000000 +0200
|
|
+++ ld/testsuite/ld-bootstrap/bootstrap.exp 2024-08-06 16:02:35.554864901 +0200
|
|
@@ -112,7 +112,12 @@ foreach flags $test_flags {
|
|
|
|
# This test can only be run if we have the ld build directory,
|
|
# since we need the object files.
|
|
- if {[file normalize $ld] != [file normalize $objdir/ld-new]} {
|
|
+ set ldexe $ld
|
|
+ set ldparm [string first " " $ld]
|
|
+ if { $ldparm > 0 } then {
|
|
+ set ldexe [string range $ld 0 $ldparm]
|
|
+ }
|
|
+ if {[file normalize $ldexe] != [file normalize $objdir/ld-new]} {
|
|
untested $testname
|
|
continue
|
|
}
|