From b80f87f26697e84da9099a42447f93564eb17ddc Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Oct 07 2021 18:46:40 +0000 Subject: Fix build with binutils 2.36 Signed-off-by: Cole Robinson --- diff --git a/0006-vgasrc-ignore-.node.gnu.property-binutils-2.36-suppo.patch b/0006-vgasrc-ignore-.node.gnu.property-binutils-2.36-suppo.patch new file mode 100644 index 0000000..5064212 --- /dev/null +++ b/0006-vgasrc-ignore-.node.gnu.property-binutils-2.36-suppo.patch @@ -0,0 +1,39 @@ +From 6eff8085980dba0938cea0193b8a0fd3c6b0c4ca Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 20 May 2021 23:18:48 +0100 +Subject: [PATCH] vgasrc: ignore .node.gnu.property (binutils-2.36 support) + +Modern binutils unconditionally tracks x86_64 ISA levels in intermediate +files in .note.gnu.property. Custom liker script does not handle the +section and complains about it: + + ld --gc-sections -T out/vgasrc/vgalayout.lds out/vgaccode16.o \ + out/vgaentry.o out/vgaversion.o -o out/vgarom.o + ld: section .note.gnu.property LMA [0000000000000000,0000000000000027] \ + overlaps section .text LMA [0000000000000000,00000000000098af] + +The change ignores .note* sections. + +Signed-off-by: Sergei Trofimovich +--- + vgasrc/vgalayout.lds.S | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/vgasrc/vgalayout.lds.S b/vgasrc/vgalayout.lds.S +index 533734d..c3e4f60 100644 +--- a/vgasrc/vgalayout.lds.S ++++ b/vgasrc/vgalayout.lds.S +@@ -19,5 +19,12 @@ SECTIONS + + // Discard regular data sections to force a link error if + // 16bit code attempts to access data not marked with VAR16. +- /DISCARD/ : { *(.text*) *(.rodata*) *(.data*) *(.bss*) *(COMMON) } ++ /DISCARD/ : { ++ *(.text*) ++ *(.rodata*) ++ *(.data*) ++ *(.bss*) ++ *(COMMON) ++ *(.note*) ++ } + } diff --git a/seabios.spec b/seabios.spec index acd13b2..fc20f11 100644 --- a/seabios.spec +++ b/seabios.spec @@ -4,7 +4,7 @@ Name: seabios Version: 1.14.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Open-source legacy BIOS implementation License: LGPLv3 @@ -17,6 +17,7 @@ Patch0002: 0002-reserve-more-memory-on-fseg.patch Patch0003: 0003-vgabios-Reorder-video-modes-to-work-around-a-Windows.patch Patch0004: 0004-nvme-Record-maximum-allowed-request-size.patch Patch0005: 0005-nvme-improve-namespace-allocation.patch +Patch0006: 0006-vgasrc-ignore-.node.gnu.property-binutils-2.36-suppo.patch Source10: config.vga-cirrus Source11: config.vga-isavga @@ -163,6 +164,9 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios %changelog +* Thu Oct 07 2021 Cole Robinson - 1.14.0-6 +- Fix build with binutils 2.36 + * Fri Jul 23 2021 Fedora Release Engineering - 1.14.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild