Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Sep 2017 18:18:25 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r323773 - projects/powernv/conf
Message-ID:  <201709191818.v8JIIPB2082015@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Tue Sep 19 18:18:24 2017
New Revision: 323773
URL: https://svnweb.freebsd.org/changeset/base/323773

Log:
  Instead of relying on extra linker options present only in post-tree binutils,
  suppress PT_INTERP using the linker script.

Modified:
  projects/powernv/conf/Makefile.powerpc
  projects/powernv/conf/ldscript.powerpc64

Modified: projects/powernv/conf/Makefile.powerpc
==============================================================================
--- projects/powernv/conf/Makefile.powerpc	Tue Sep 19 17:57:04 2017	(r323772)
+++ projects/powernv/conf/Makefile.powerpc	Tue Sep 19 18:18:24 2017	(r323773)
@@ -46,12 +46,6 @@ CFLAGS.gcc+= -Wa,-many
 CFLAGS+= -fPIC
 LDFLAGS+= -pie
 
-# Work around assertion in kexec-lite. The GCC version switch is really
-# a binutils version switch by correlation.
-.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 50000
-LDFLAGS+= --no-dynamic-linker
-.endif
-
 .if !empty(DDB_ENABLED)
 CFLAGS+=	-fno-omit-frame-pointer
 .endif

Modified: projects/powernv/conf/ldscript.powerpc64
==============================================================================
--- projects/powernv/conf/ldscript.powerpc64	Tue Sep 19 17:57:04 2017	(r323772)
+++ projects/powernv/conf/ldscript.powerpc64	Tue Sep 19 18:18:24 2017	(r323773)
@@ -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?201709191818.v8JIIPB2082015>