1From 5126732d73aa75a0bc84f898042bfe35640624b8 Mon Sep 17 00:00:00 2001 2From: Thomas Huth <thuth@redhat.com> 3Date: Wed, 13 May 2020 13:14:46 +0200 4Subject: [PATCH] Fix powerpc issue with the linker from Fedora 32 5 6The linker from Fedora 32 complains: 7 8powerpc64-linux-gnu-ld: powerpc/selftest.elf: error: PHDR segment not 9 covered by LOAD segment 10 11Let's introduce some fake PHDRs to the linker script to get this 12working again. 13 14Message-Id: <20200514192626.9950-7-thuth@redhat.com> 15Signed-off-by: Thomas Huth <thuth@redhat.com> 16Signed-off-by: Matthew Weber <matthew.weber@collins.com> 17--- 18 powerpc/flat.lds | 19 ++++++++++++++++--- 19 1 file changed, 16 insertions(+), 3 deletions(-) 20 21diff --git a/powerpc/flat.lds b/powerpc/flat.lds 22index 53221e8..5eed368 100644 23--- a/powerpc/flat.lds 24+++ b/powerpc/flat.lds 25@@ -1,7 +1,17 @@ 26 27+PHDRS 28+{ 29+ text PT_LOAD FLAGS(5); 30+ data PT_LOAD FLAGS(6); 31+} 32+ 33 SECTIONS 34 { 35- .text : { *(.init) *(.text) *(.text.*) } 36+ .text : { 37+ *(.init) 38+ *(.text) 39+ *(.text.*) 40+ } :text 41 . = ALIGN(64K); 42 etext = .; 43 .opd : { *(.opd) } 44@@ -19,9 +29,12 @@ SECTIONS 45 .data : { 46 *(.data) 47 *(.data.rel*) 48- } 49+ } :data 50 . = ALIGN(16); 51- .rodata : { *(.rodata) *(.rodata.*) } 52+ .rodata : { 53+ *(.rodata) 54+ *(.rodata.*) 55+ } :data 56 . = ALIGN(16); 57 .bss : { *(.bss) } 58 . = ALIGN(256); 59-- 602.17.1 61 62