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     :
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to