diff --git a/memtest86+-5.31b-discard-note_gnu_property.patch b/memtest86+-5.31b-discard-note_gnu_property.patch new file mode 100644 index 0000000..b1c5d6e --- /dev/null +++ b/memtest86+-5.31b-discard-note_gnu_property.patch @@ -0,0 +1,29 @@ +Index: memtest86+-5.31b/Makefile +=================================================================== +--- memtest86+-5.31b.orig/Makefile ++++ memtest86+-5.31b/Makefile +@@ -10,11 +10,11 @@ + FDISK=/dev/fd0 + TARGETDIR=/boot + +-AS=as -32 ++AS=as -32 -mx86-used-note=no + CC=gcc + + CFLAGS= -Wall -Werror -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ +- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector ++ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector -Wa,-mx86-used-note=no + + SELF_TEST_CFLAGS = -Wall -Werror -march=i486 -m32 -O1 -g + +Index: memtest86+-5.31b/memtest.bin.lds +=================================================================== +--- memtest86+-5.31b.orig/memtest.bin.lds ++++ memtest86+-5.31b/memtest.bin.lds +@@ -11,5 +11,6 @@ SECTIONS { + *(.data) + _end = . ; + } ++ /DISCARD/ : { *(.note.gnu.property) } + _syssize = (_end - _start + 15) >> 4; + } diff --git a/memtest86+.changes b/memtest86+.changes index 8781aee..7959e77 100644 --- a/memtest86+.changes +++ b/memtest86+.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 27 06:57:21 UTC 2021 - Josef Möllers + +- Due to recent binutils update the gnu assembler defaults to + generate a ".note.gnu.property" section. The linker happily picks + it up to the output binary that offsets the real code entry and + crashes at runtime. + This patch discards the ".note.gnu.property" section. + [bsc#1185272, memtest86+-5.31b-discard-note_gnu_property.patch] + ------------------------------------------------------------------- Sun Jan 17 13:48:44 UTC 2021 - Dirk Müller diff --git a/memtest86+.spec b/memtest86+.spec index 205cf9c..df0089c 100644 --- a/memtest86+.spec +++ b/memtest86+.spec @@ -26,6 +26,7 @@ URL: https://www.memtest.org Source: https://www.memtest.org/download/%{version}/memtest86+-%{version}.tar.gz Patch0: fix-destdir Patch1: memtest86+-5.01-no-optimization.patch +Patch2: memtest86+-5.31b-discard-note_gnu_property.patch #!BuildIgnore: gcc-PIE Requires(pre): /sbin/update-bootloader Requires(pre): perl @@ -45,6 +46,7 @@ it can be used to test the computer's memory. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build # dependencies are broken for the package and it should not be built in parallel