Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Nov 2017 21:45:51 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326203 - head/sys/conf
Message-ID:  <201711252145.vAPLjpV6051703@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sat Nov 25 21:45:51 2017
New Revision: 326203
URL: https://svnweb.freebsd.org/changeset/base/326203

Log:
  Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for
  the first instruction to be at the start of the text segment. This allows
  the kernel to be booted correctly by stock kexec-lite.
  
  MFC after:	2 weeks

Modified:
  head/sys/conf/ldscript.powerpc64

Modified: head/sys/conf/ldscript.powerpc64
==============================================================================
--- head/sys/conf/ldscript.powerpc64	Sat Nov 25 21:44:23 2017	(r326202)
+++ head/sys/conf/ldscript.powerpc64	Sat Nov 25 21:45:51 2017	(r326203)
@@ -10,7 +10,7 @@ SECTIONS
 {
   /* Read-only sections, merged into text segment: */
 
-  . = kernbase + SIZEOF_HEADERS;
+  . = kernbase;
   PROVIDE (begin = . - SIZEOF_HEADERS);
 
   .text      :
@@ -24,7 +24,10 @@ SECTIONS
   _etext = .;
   PROVIDE (etext = .);
 
-  .interp     : { *(.interp) 	}
+  /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */
+  .interpX    : { *(.interp) 	} : NONE
+  /DISCARD/   : { *(.interp)	} 
+
   .hash          : { *(.hash)		}
   .dynsym        : { *(.dynsym)		}
   .dynstr        : { *(.dynstr)		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711252145.vAPLjpV6051703>