Compare commits

..

No commits in common. "factory" and "devel" have entirely different histories.

14 changed files with 219 additions and 200 deletions

View File

@ -16,7 +16,6 @@
<flavor>spu</flavor>
<flavor>avr</flavor>
<flavor>pru</flavor>
<flavor>loongarch64</flavor>
<flavor>mips</flavor>
<flavor>m68k</flavor>
<flavor>epiphany</flavor>

BIN
binutils-2.42-branch.diff.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
binutils-2.42.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

16
binutils-2.42.tar.bz2.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEOiS8Ho+0CfqfFDcYE/zvid2ePE8FAmW3wiYACgkQE/zvid2e
PE+HQBAAgC3yZJvJBx/0EtNESazNRpUG8G4pnd0505QYiibf+5243xXusDySXVu3
iBt2UltDPauPu6eIUC7qY0xaZHhPuxqPHp6oSrB73iHZ7ovTdbZUX2060Ro8KXha
xN6+SPBHQGxP8XZw+ezexYNpwHBGM8CUos7UeeLpskuSBRGQC4bEhCOR8wuvU1w9
gHTFuOY5zKgzzNMr1fPp/tRqUqZr8A7R1HN6tAs+4N2QWLk9Z/oF7h7Rkrzqe8gY
vmaakulfBTiqNIZJyTQhbhPiWrtLdElKyohBa/enqtTrktXoX/gwX21+LMqU+Oh3
qE7CicjEZKGK/e8gl0BjcwgMeuUYYpZRUI1+A++YAu+YPSzLQL9iPy1FUovrYhHO
Fr/qV156MtnhkoaI7RVDLKl2s3CP451yjHSDcAsB51wq+QophC3z6yoTXKuKW8h6
v2yW5ZaG5GfiPmRw+E46qsZWeb2pOUaGVU8ovaYWfLjrZ20WFZwZKLn55ZwZ35eW
g3RSff4f0lqr8x7jWDkf+KQMC2K0O6Sl0sgFoFE6PMPFcGe4r6oSIekNygaFgxBv
DrL0IA8y1prpmpnJrGbIg1+ciguAJKEBfcV9pNyq1IAHWu3aOMbWKb5pF0ukb0PY
OueuuH06uaBa7vgZxvbTiw0j5+PuTlGHa3Bsf4rlkChK2N/6deQ=
=5bYR
-----END PGP SIGNATURE-----

BIN
binutils-2.43-branch.diff.gz (Stored with Git LFS)

Binary file not shown.

BIN
binutils-2.43.tar.bz2 (Stored with Git LFS)

Binary file not shown.

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEOiS8Ho+0CfqfFDcYE/zvid2ePE8FAmaviv8ACgkQE/zvid2e
PE9C2hAAw9RCvIe7c6zdMBslwnHm5lJE4P8OLgfvQhW1LyNMM7q6UtJC0oG1mCAk
qpfDkp62XXXLu8QUVvuGhLOrAC7PkkwRs+RKaidOmQ1DDaFsh6h1EilbRbeXhwT6
+GgL9gmoflWQ+/VTi8ETc6F0kxfbOFLDgWQf8LZ66g9Z5RzoUaRfcktljjPpmgvh
kp2V/8QsY6rTtJDpTfSp5ysvvfkuh0DQBN/aOlnjcbupaj2p2aBrs0PiAmtiNfGZ
616FCFytqNYX8KxVV3OZcTOCKARcFxXc/4q1za+0musaqLHGlw8h27jTEU51lQJy
gemDWIJbVoth/jK4/pIl7rsiLte136qj6JybsAh3LLM7JTcwf9rha0DyU0nBmSyt
4PfzOsoSRjfIBTTPlmS7L2thY8+Y0sYPcIf8lj8ue9YZyYYSix/8KUm/0vvmwJr8
XUiw0sUpGcSUTFjqhNxcjqORSQBWb9kjRod+PdU9LEFE4cp3mexkzjIgEWDkRjqP
sTdstNT1A5LiX5XhcMKVze9D28y2XQRxkbvbBbm4nt4cIBvk1QtsZZH4bR5ABgyF
q8kp0FpBrbvOBTDQsuAuvL9lOg5unngZLAOeogxsOJblirzX6cPku5NDQgY7GYUP
SIEOJaMU5OoI6NU9iVt1LBZZaMO6+16PTNQ2MArgI0g2B1HNC3U=
=vvKA
-----END PGP SIGNATURE-----

View File

@ -1,22 +0,0 @@
This is used to manually patch the bison generated files when
the binutils-X.YZ-branch.diff touches them. That diff is generated
directly from git and doesn't contain the generated .c/h files.
The base tarball does contain them, but generated from the unpatched state.
In SLE12 and older we can't regenerate them due to too old versions
of flex and bison.
So, when the branch diff _does_ touch them we need to do the regeneration
via such a manual patch.
Index: binutils-2.43/ld/ldgram.c
===================================================================
--- binutils-2.43.orig/ld/ldgram.c 2024-08-04 01:00:00.000000000 +0200
+++ binutils-2.43/ld/ldgram.c 2024-12-09 16:41:08.089715376 +0100
@@ -2839,7 +2839,7 @@ yyreduce:
case 73: /* ifile_p1: SEARCH_DIR '(' filename ')' */
#line 324 "ldgram.y"
- { ldfile_add_library_path ((yyvsp[-1].name), search_dir_linker_script); }
+ { ldfile_add_library_path ((yyvsp[-1].name), false); }
#line 2844 "ldgram.c"
break;

20
binutils-pr22868.diff Normal file
View File

@ -0,0 +1,20 @@
Fixes two testsuite fails in the gold plugin tests of LLVM.
Aka binutils/PR22868
Index: binutils-2.30/gold/resolve.cc
===================================================================
--- binutils-2.30.orig/gold/resolve.cc 2018-01-13 14:31:16.000000000 +0100
+++ binutils-2.30/gold/resolve.cc 2018-03-06 16:58:42.000000000 +0100
@@ -265,10 +265,13 @@ Symbol_table::resolve(Sized_symbol<size>
return;
// Likewise for an absolute symbol defined twice with the same value.
+ // plugin-symbols are always absolute with same value here, so ignore those
if (!is_ordinary
&& st_shndx == elfcpp::SHN_ABS
&& !to_is_ordinary
&& to_shndx == elfcpp::SHN_ABS
+ && object->pluginobj() == NULL
+ && to->object()->pluginobj() == NULL
&& to->value() == sym.get_st_value())
return;

View File

@ -26,10 +26,10 @@ of missing support in ld.so.
proper predicate to guard themself)
Index: binutils-2.43/bfd/elf64-x86-64.c
Index: binutils-2.42/bfd/elf64-x86-64.c
===================================================================
--- binutils-2.43.orig/bfd/elf64-x86-64.c 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/bfd/elf64-x86-64.c 2024-08-06 16:48:36.554787135 +0200
--- binutils-2.42.orig/bfd/elf64-x86-64.c 2024-01-30 16:59:42.442361796 +0100
+++ binutils-2.42/bfd/elf64-x86-64.c 2024-01-30 17:54:25.162977883 +0100
@@ -48,127 +48,127 @@ static reloc_howto_type x86_64_elf_howto
bfd_elf_generic_reloc, "R_X86_64_NONE", false, 0, 0x00000000,
false),
@ -199,7 +199,7 @@ Index: binutils-2.43/bfd/elf64-x86-64.c
true),
HOWTO(R_X86_64_CODE_4_GOTPCRELX, 0, 4, 32, true, 0, complain_overflow_signed,
bfd_elf_generic_reloc, "R_X86_64_CODE_4_GOTPCRELX", false, 0, 0xffffffff,
@@ -216,7 +216,7 @@ static reloc_howto_type x86_64_elf_howto
@@ -198,7 +198,7 @@ static reloc_howto_type x86_64_elf_howto
/* Use complain_overflow_bitfield on R_X86_64_32 for x32. */
HOWTO(R_X86_64_32, 0, 4, 32, false, 0, complain_overflow_bitfield,
@ -208,9 +208,9 @@ Index: binutils-2.43/bfd/elf64-x86-64.c
false)
};
Index: binutils-2.43/gas/testsuite/gas/i386/rela.d
Index: binutils-2.42/gas/testsuite/gas/i386/rela.d
===================================================================
--- binutils-2.43.orig/gas/testsuite/gas/i386/rela.d 2024-08-06 16:48:34.104745566 +0200
--- binutils-2.42.orig/gas/testsuite/gas/i386/rela.d 2024-01-29 01:00:00.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-#name: x86-64 rela relocs w/ non-zero relocated fields
@ -226,9 +226,9 @@ Index: binutils-2.43/gas/testsuite/gas/i386/rela.d
-
-Contents of section .data:
- 0+0 11 ?11 ?11 ?11 22 ?22 ?22 ?22 33 ?33 ?33 ?33 44 ?44 ?44 ?44 .*
Index: binutils-2.43/gas/testsuite/gas/i386/rela.s
Index: binutils-2.42/gas/testsuite/gas/i386/rela.s
===================================================================
--- binutils-2.43.orig/gas/testsuite/gas/i386/rela.s 2024-08-06 16:48:34.104745566 +0200
--- binutils-2.42.orig/gas/testsuite/gas/i386/rela.s 2024-01-29 01:00:00.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-# Note: This file is also used by an ld test case.
@ -245,9 +245,9 @@ Index: binutils-2.43/gas/testsuite/gas/i386/rela.s
-
- .reloc l, BFD_RELOC_64, q
- .reloc q, BFD_RELOC_32, l
Index: binutils-2.43/ld/testsuite/ld-x86-64/rela.d
Index: binutils-2.42/ld/testsuite/ld-x86-64/rela.d
===================================================================
--- binutils-2.43.orig/ld/testsuite/ld-x86-64/rela.d 2024-08-06 16:48:34.104745566 +0200
--- binutils-2.42.orig/ld/testsuite/ld-x86-64/rela.d 2024-01-29 01:00:00.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,10 +0,0 @@
-#name: x86-64 rela relocs w/ non-zero relocated fields
@ -260,11 +260,11 @@ Index: binutils-2.43/ld/testsuite/ld-x86-64/rela.d
-
-Contents of section .data:
- *[0-9a-f]*0 .8 ?.. ?.. ?.. 00 ?00 ?00 ?00 .0 ?.. ?.. ?.. 44 ?44 ?44 ?44 .*
Index: binutils-2.43/ld/testsuite/ld-x86-64/x86-64.exp
Index: binutils-2.42/ld/testsuite/ld-x86-64/x86-64.exp
===================================================================
--- binutils-2.43.orig/ld/testsuite/ld-x86-64/x86-64.exp 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/ld/testsuite/ld-x86-64/x86-64.exp 2024-08-06 16:48:36.554787135 +0200
@@ -309,7 +309,6 @@ run_dump_test "apic"
--- binutils-2.42.orig/ld/testsuite/ld-x86-64/x86-64.exp 2024-01-30 16:57:58.487327524 +0100
+++ binutils-2.42/ld/testsuite/ld-x86-64/x86-64.exp 2024-01-30 17:55:13.480432003 +0100
@@ -291,7 +291,6 @@ run_dump_test "apic"
run_dump_test "pcrel8"
run_dump_test "pcrel16"
run_dump_test "pcrel16-2"
@ -272,7 +272,7 @@ Index: binutils-2.43/ld/testsuite/ld-x86-64/x86-64.exp
run_dump_test "tlsgd2"
run_dump_test "tlsgd3"
run_dump_test "tlsgd12"
@@ -524,10 +523,10 @@ run_dump_test "pr27491-1c"
@@ -506,10 +505,10 @@ run_dump_test "pr27491-1c"
run_dump_test "pr27491-2"
run_dump_test "pr27491-3"
run_dump_test "pr27491-4"
@ -287,11 +287,11 @@ Index: binutils-2.43/ld/testsuite/ld-x86-64/x86-64.exp
run_dump_test "pr30787"
run_dump_test "pr31047"
run_dump_test "pr31047-x32"
Index: binutils-2.43/binutils/testsuite/lib/binutils-common.exp
Index: binutils-2.42/binutils/testsuite/lib/binutils-common.exp
===================================================================
--- binutils-2.43.orig/binutils/testsuite/lib/binutils-common.exp 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/binutils/testsuite/lib/binutils-common.exp 2024-08-06 16:48:36.554787135 +0200
@@ -470,6 +470,8 @@ proc supports_persistent_section {} {
--- binutils-2.42.orig/binutils/testsuite/lib/binutils-common.exp 2024-01-29 01:00:00.000000000 +0100
+++ binutils-2.42/binutils/testsuite/lib/binutils-common.exp 2024-01-30 17:54:25.166311271 +0100
@@ -449,6 +449,8 @@ proc supports_persistent_section {} {
# Whether a target support DT_RELR sections.
proc supports_dt_relr {} {
@ -299,11 +299,11 @@ Index: binutils-2.43/binutils/testsuite/lib/binutils-common.exp
+ return 0
if { ([istarget x86_64-*-*]
|| [istarget i?86-*-*]
|| [istarget powerpc64*-*-*]
Index: binutils-2.43/ld/emulparams/dt-relr.sh
|| [istarget powerpc64*-*-*])
Index: binutils-2.42/ld/emulparams/dt-relr.sh
===================================================================
--- binutils-2.43.orig/ld/emulparams/dt-relr.sh 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/ld/emulparams/dt-relr.sh 2024-08-06 16:48:36.554787135 +0200
--- binutils-2.42.orig/ld/emulparams/dt-relr.sh 2024-01-29 01:00:00.000000000 +0100
+++ binutils-2.42/ld/emulparams/dt-relr.sh 2024-01-30 17:54:25.166311271 +0100
@@ -1,3 +1,8 @@
+if false; then
+ # on old codestreams we don't have the DT_RELR support in the dynamic
@ -319,10 +319,10 @@ Index: binutils-2.43/ld/emulparams/dt-relr.sh
PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_PACK_RELATIVE_RELOCS"
+
+fi
Index: binutils-2.43/ld/testsuite/ld-i386/i386.exp
Index: binutils-2.42/ld/testsuite/ld-i386/i386.exp
===================================================================
--- binutils-2.43.orig/ld/testsuite/ld-i386/i386.exp 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/ld/testsuite/ld-i386/i386.exp 2024-08-06 16:48:36.554787135 +0200
--- binutils-2.42.orig/ld/testsuite/ld-i386/i386.exp 2024-01-29 01:00:00.000000000 +0100
+++ binutils-2.42/ld/testsuite/ld-i386/i386.exp 2024-01-30 17:54:25.166311271 +0100
@@ -507,8 +507,8 @@ run_dump_test "pr27491-1c"
run_dump_test "pr27491-2"
run_dump_test "pr27491-3"
@ -334,10 +334,10 @@ Index: binutils-2.43/ld/testsuite/ld-i386/i386.exp
run_dump_test "pr28870"
run_dump_test "pr28894"
run_dump_test "pr30787"
Index: binutils-2.43/ld/testsuite/ld-powerpc/powerpc.exp
Index: binutils-2.42/ld/testsuite/ld-powerpc/powerpc.exp
===================================================================
--- binutils-2.43.orig/ld/testsuite/ld-powerpc/powerpc.exp 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/ld/testsuite/ld-powerpc/powerpc.exp 2024-08-06 16:48:36.554787135 +0200
--- binutils-2.42.orig/ld/testsuite/ld-powerpc/powerpc.exp 2024-01-29 01:00:00.000000000 +0100
+++ binutils-2.42/ld/testsuite/ld-powerpc/powerpc.exp 2024-01-30 17:54:25.166311271 +0100
@@ -378,14 +378,14 @@ set ppc64elftests {
"-a64" {abs-reloc.s}
{{objdump {-sdr} abs-shared.d}
@ -361,11 +361,11 @@ Index: binutils-2.43/ld/testsuite/ld-powerpc/powerpc.exp
}
set ppceabitests {
Index: binutils-2.43/gas/testsuite/gas/i386/x86-64.exp
Index: binutils-2.42/gas/testsuite/gas/i386/x86-64.exp
===================================================================
--- binutils-2.43.orig/gas/testsuite/gas/i386/x86-64.exp 2024-08-06 16:48:34.104745566 +0200
+++ binutils-2.43/gas/testsuite/gas/i386/x86-64.exp 2024-08-06 16:48:36.554787135 +0200
@@ -653,7 +653,6 @@ if [is_elf_format] then {
--- binutils-2.42.orig/gas/testsuite/gas/i386/x86-64.exp 2024-01-29 01:00:00.000000000 +0100
+++ binutils-2.42/gas/testsuite/gas/i386/x86-64.exp 2024-01-30 17:54:25.166311271 +0100
@@ -628,7 +628,6 @@ if [is_elf_format] then {
run_list_test "reloc64" "--defsym _bad_=1"
run_list_test "x86-64-inval-tls"
run_dump_test "mixed-mode-reloc64"

View File

@ -1,106 +1,3 @@
-------------------------------------------------------------------
Tue Dec 17 14:09:54 UTC 2024 - Andreas Schwab <schwab@suse.de>
- Unset SUSE_ZNOW while running testsuite, many tests cannot cope
-------------------------------------------------------------------
Mon Dec 9 14:49:46 UTC 2024 - Michael Matz <matz@suse.com>
- Update to current 2.43.1 branch [PED-10254, PED-10306]:
* s390 - Add arch15 instructions
* various fixes from upstream: PR32153, PR32171, PR32189,
PR32196, PR32191, PR32109, PR32372, PR32387
- Adjusted binutils-2.43-branch.diff.gz.
- Disable zstd-by-default again (needs adjustments in at least
golang,llvm15,llvm17 first)
- Add binutils-fix-branch.diff.
- Check non-changing of flex/bison inputs only after applying
branch and fix-branch diffs.
-------------------------------------------------------------------
Wed Nov 20 14:59:28 UTC 2024 - Jiri Slaby <jslaby@suse.cz>
- drop ld-relro.diff (relro is the default for some time)
and it warns on avr spuriously (bsc#1233520)
-------------------------------------------------------------------
Mon Nov 18 18:12:05 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Add loongarch64 as new target
-------------------------------------------------------------------
Tue Sep 10 05:25:27 UTC 2024 - Martin Liška <martin.liska@hey.com>
- Enable zstd compression algorithm (instead of zlib)
for debug info sections by default.
-------------------------------------------------------------------
Wed Aug 28 13:18:28 UTC 2024 - Michael Matz <matz@suse.com>
- Update to current 2.43.1 branch [PED-10474]:
* PR32109 - fuzzing problem
* PR32083 - LTO vs overridden common symbols
* PR32067 - crash with LTO-plugin and --oformat=binary
* PR31956 - LTO vs wrapper symbols
* riscv - add Zimop and Zcmop extensions
- Adjusted binutils-2.43-branch.diff.gz.
-------------------------------------------------------------------
Tue Aug 6 14:09:24 UTC 2024 - Michael Matz <matz@suse.com>
- Update to version 2.43:
* 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:
- put .got and .got.plt into relro segment
- add -z isa-level-report=[none|all|needed|used] to the x86 ELF
linker to report needed and used x86-64 ISA levels
- add --rosegment option which changes the -z separate-code
option so that only one read-only segment is created (instead
of two)
- add --section-ordering-file <FILE> option to add extra
mapping of input sections to output sections
- add -plugin-save-temps to store plugin intermediate files
permanently
- Removed binutils-2.42.tar.bz2, binutils-2.42-branch.diff.gz.
- Added binutils-2.43.tar.bz2, binutils-2.43-branch.diff.gz.
- Removed upstream patch riscv-no-relax.patch.
- Rebased ld-relro.diff and binutils-revert-rela.diff.
-------------------------------------------------------------------
Thu Jun 13 08:35:38 UTC 2024 - Andreas Schwab <schwab@suse.de>
- binutils-pr22868.diff: Remove obsolete patch
- Undefine _FORTIFY_SOURCE when running checks
-------------------------------------------------------------------
Wed May 1 09:52:29 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>

View File

@ -64,7 +64,7 @@ BuildRequires: zlib-devel
%if %{suse_version} > 1500
BuildRequires: libzstd-devel
%endif
Version: 2.43
Version: 2.42
Release: 0
# disable libalternatives for now until it's changed to not
@ -104,7 +104,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 loongarch64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define build_gprofng 0
@ -131,12 +131,12 @@ Source: binutils-%{version}.tar.bz2
Source2: binutils-%{version}.tar.bz2.sig
Source3: binutils.keyring
Source4: baselibs.conf
Patch1: binutils-2.43-branch.diff.gz
Patch2: binutils-fix-branch.diff
Patch1: binutils-2.42-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
Patch6: unit-at-a-time.patch
Patch8: ld-relro.diff
Patch9: testsuite.diff
Patch10: enable-targets-gold.diff
Patch12: s390-pic-dso.diff
@ -144,6 +144,7 @@ Patch14: binutils-build-as-needed.diff
Patch15: binutils-znow.patch
Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch36: binutils-pr22868.diff
Patch37: binutils-revert-plt32-in-branches.diff
Patch38: binutils-fix-invalid-op-errata.diff
Patch39: binutils-revert-nm-symversion.diff
@ -153,6 +154,7 @@ Patch42: binutils-compat-old-behaviour.diff
Patch43: binutils-revert-hlasm-insns.diff
Patch44: binutils-revert-rela.diff
Patch60: binutils-disable-code-arch-error.diff
Patch61: riscv-no-relax.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -245,23 +247,19 @@ The next generation profiling tool for Linux
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch -P 1 -p1
%patch -P 2 -p1
# Backup flex and biscon files for later verification. Do this
# after branch and fix-branch patches are applied (which are assumed
# to manual fixup generated files, in case the branch diff touches
# the flex/bison source files)
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch -P 1 -p1
%if !%{test_vanilla}
%patch -P 3 -p1
%patch -P 4
%patch -P 5
%patch -P 6
%patch -P 8
%patch -P 9
%patch -P 10
%patch -P 12
@ -269,6 +267,7 @@ cp ld/ldgram.y ld/ldgram.y.orig
%patch -P 15
%patch -P 22
%patch -P 34 -p1
%patch -P 36 -p1
%if %{suse_version} < 1550
%patch -P 37 -p1
%endif
@ -282,6 +281,7 @@ cp ld/ldgram.y ld/ldgram.y.orig
%patch -P 44 -p1
%endif
%patch -P 60 -p1
%patch -P 61 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch -P 90
@ -392,9 +392,8 @@ cd build-dir
--enable-warn-execstack=yes \
--enable-warn-rwx-segments=yes
# FIXME: enable in future, when at least llvm15,llvm17,golang are
# fixed to accept zstd
#%if %{suse_version} > 1600
#FIXME: enable in the future
#%if %{suse_version} > 1550
# --enable-default-compressed-debug-sections-algorithm=zstd \
#%endif
@ -494,7 +493,7 @@ make -C gas-nesc %{?make_output_sync} %{?_smp_mflags}
%endif
%check
unset SUSE_ASNEEDED SUSE_ZNOW
unset SUSE_ASNEEDED
# newer distros set this envvar (e.g. to get deterministic archives by default)
# but of course that breaks tests that precisely are
# designed for checking file replacement in archives based on mtime.
@ -504,8 +503,7 @@ cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" CFLAGS_FOR_TARGET="-O2 -g" CXXFLAGS_FOR_TARGET="-O2 -g" || %{make_check_handling}
%else
# _FORTIFY_SOURCE does not work with -O0
make -k check CFLAGS="-g $RPM_OPT_FLAGS -U_FORTIFY_SOURCE" CXXFLAGS="-g $RPM_OPT_FLAGS -U_FORTIFY_SOURCE" CFLAGS_FOR_TARGET="-g $RPM_OPT_FLAGS -U_FORTIFY_SOURCE" CXXFLAGS_FOR_TARGET="-g $RPM_OPT_FLAGS -U_FORTIFY_SOURCE" || %{make_check_handling}
make -k check CFLAGS="-g $RPM_OPT_FLAGS" CXXFLAGS="-g $RPM_OPT_FLAGS" CFLAGS_FOR_TARGET="-g $RPM_OPT_FLAGS" CXXFLAGS_FOR_TARGET="-g $RPM_OPT_FLAGS" || %{make_check_handling}
%endif
%install

63
ld-relro.diff Normal file
View File

@ -0,0 +1,63 @@
Index: ld/lexsup.c
===================================================================
--- ld/lexsup.c.orig 2014-10-14 17:43:07.000000000 +0200
+++ ld/lexsup.c 2014-10-14 17:43:26.000000000 +0200
@@ -623,6 +623,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 2014-10-14 17:43:07.000000000 +0200
+++ ld/testsuite/config/default.exp 2014-10-14 17:44:58.000000000 +0200
@@ -22,7 +22,7 @@
#
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 {
@@ -70,7 +70,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
@@ -272,7 +272,7 @@ if ![info exists READELFFLAGS] 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 2014-10-14 17:43:07.000000000 +0200
+++ ld/testsuite/ld-bootstrap/bootstrap.exp 2014-10-14 17:43:26.000000000 +0200
@@ -106,7 +106,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
}

64
riscv-no-relax.patch Normal file
View File

@ -0,0 +1,64 @@
From af514e5f6d1d0233a251a3ae17f7cb8d9ba8e36b Mon Sep 17 00:00:00 2001
From: Nelson Chu <nelson@rivosinc.com>
Date: Mon, 29 Jan 2024 21:17:41 +0800
Subject: [PATCH] RISC-V: Don't generate branch/jump relocation if symbol is
local when no-relax.
Refer to commit, dff565fcca8137954d6ad571ef39f6aec5c0429c. Theoretically,
assembler don't need to generate the pc-relative relocation and the refered
local .L symbol when relaxation is disabled. The above commit improved the
pcrel_hi/pcrel_lo relocations, and this commit improves branch and jump
relocations.
Passed the gcc/binutils regressions of riscv-gnu-toolchain.
gas/
* config/tc-riscv.c (md_apply_fix): Raise fixP->fx_done for all
branch and jump relocations when -mno-relax.
---
gas/config/tc-riscv.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index a4161420128..cbead954f09 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -4390,6 +4390,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP;
bfd_vma delta = target - md_pcrel_from (fixP);
bfd_putl32 (bfd_getl32 (buf) | ENCODE_JTYPE_IMM (delta), buf);
+ if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy))
+ fixP->fx_done = 1;
}
break;
@@ -4400,6 +4402,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP;
bfd_vma delta = target - md_pcrel_from (fixP);
bfd_putl32 (bfd_getl32 (buf) | ENCODE_BTYPE_IMM (delta), buf);
+ if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy))
+ fixP->fx_done = 1;
}
break;
@@ -4410,6 +4414,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP;
bfd_vma delta = target - md_pcrel_from (fixP);
bfd_putl16 (bfd_getl16 (buf) | ENCODE_CBTYPE_IMM (delta), buf);
+ if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy))
+ fixP->fx_done = 1;
}
break;
@@ -4420,6 +4426,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
bfd_vma target = S_GET_VALUE (fixP->fx_addsy) + *valP;
bfd_vma delta = target - md_pcrel_from (fixP);
bfd_putl16 (bfd_getl16 (buf) | ENCODE_CJTYPE_IMM (delta), buf);
+ if (!riscv_opts.relax && S_IS_LOCAL (fixP->fx_addsy))
+ fixP->fx_done = 1;
}
break;
--
2.43.2