Date: Tue, 03 Sep 2019 14:06:05 -0000 From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345678 - head/sys/conf Message-ID: <201903290301.x2T31LOr083837@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Fri Mar 29 03:01:21 2019 New Revision: 345678 URL: https://svnweb.freebsd.org/changeset/base/345678 Log: powerpc64: Fix kernel ldscript to only emit one PT_LOAD segment Summary: kexec-lite cannot currently handle multiple PT_LOAD segments. In some cases the compiler generates multiple PT_LOAD segments for an unknown reason, causing boot to fail from kexec-lite. Submitted by: Brandon Bergren (older version) Differential Revision: https://reviews.freebsd.org/D19574 Modified: head/sys/conf/ldscript.powerpc64 Modified: head/sys/conf/ldscript.powerpc64 ============================================================================== --- head/sys/conf/ldscript.powerpc64 Fri Mar 29 02:44:20 2019 (r345677) +++ head/sys/conf/ldscript.powerpc64 Fri Mar 29 03:01:21 2019 (r345678) @@ -6,12 +6,17 @@ OUTPUT_ARCH(powerpc:common64) ENTRY(__start) SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); +PHDRS +{ + text PT_LOAD ; + dynamic PT_DYNAMIC ; +} SECTIONS { /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */ . = kernbase - 0x100; - .kboot : { *(.text.kboot) } + .kboot : { *(.text.kboot) } :text /* Read-only sections, merged into text segment: */ . = kernbase; @@ -19,6 +24,7 @@ SECTIONS .text : { + *(.glink) *(.text) *(.stub) /* .gnu.warning sections are handled specially by elf32.em. */ @@ -29,7 +35,6 @@ SECTIONS PROVIDE (etext = .); /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */ - .interpX : { *(.interp) } : NONE /DISCARD/ : { *(.interp) } /* Also delete notes */ @@ -95,7 +100,7 @@ SECTIONS . = ALIGN(4096); .got : ALIGN(8) { __tocbase = .; *(.got .toc) } - .dynamic : { *(.dynamic) } + .dynamic : { *(.dynamic) } :text :dynamic /* Put .ctors and .dtors next to the .got2 section, so that the pointers get relocated with -mrelocatable. Also put in the .fixup pointers. The current compiler no longer needs this, but keep it around for 2.7.2 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903290301.x2T31LOr083837>