Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2020 19:40:59 +0000 (UTC)
From:      Brandon Bergren <bdragon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361703 - head/sys/conf
Message-ID:  <202006011940.051JexmN020358@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdragon
Date: Mon Jun  1 19:40:59 2020
New Revision: 361703
URL: https://svnweb.freebsd.org/changeset/base/361703

Log:
  [PowerPC] Fix build-id note on powerpc64 kernel
  
  Due to the ordering of the powerpc64 linker script, we were discarding
  all notes before emitting .note.gnu.build-id. This had the effect of
  generating an empty build id section and breaking the kern.build_id
  sysctl added in r348611.
  
  powerpc and powerpcspe are uneffected.
  
  PR:		246430
  MFC after:	3 days
  Sponsored by:	Tag1 Consulting, Inc.

Modified:
  head/sys/conf/ldscript.powerpc64

Modified: head/sys/conf/ldscript.powerpc64
==============================================================================
--- head/sys/conf/ldscript.powerpc64	Mon Jun  1 19:34:21 2020	(r361702)
+++ head/sys/conf/ldscript.powerpc64	Mon Jun  1 19:40:59 2020	(r361703)
@@ -37,9 +37,6 @@ SECTIONS
   /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */
   /DISCARD/   : { *(.interp)	} 
 
-  /* Also delete notes */
-  /DISCARD/   : { *(.note.*)	} 
-
   .hash          : { *(.hash)		}
   .dynsym        : { *(.dynsym)		}
   .dynstr        : { *(.dynstr)		}
@@ -51,6 +48,10 @@ SECTIONS
     *(.note.gnu.build-id)
     PROVIDE (__build_id_end = .);
   }
+
+  /* Do not emit any additional notes. */
+  /DISCARD/   : { *(.note.*)	} 
+
   .rela.text     :
     { *(.rela.text) *(.rela.gnu.linkonce.t*) }
   .rela.data     :



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