git: efc7664f9ba1 - MFC r361703:

Brandon Bergren bdragon at FreeBSD.org
Fri Dec 25 20:47:19 UTC 2020


The branch stable/12 has been updated by bdragon:

URL: https://cgit.FreeBSD.org/src/commit/?id=efc7664f9ba1322ab5ba47a1a64e29fa661021ed

commit efc7664f9ba1322ab5ba47a1a64e29fa661021ed
Author:     Brandon Bergren <bdragon at FreeBSD.org>
AuthorDate: 2020-06-01 19:40:59 +0000
Commit:     Brandon Bergren <bdragon at FreeBSD.org>
CommitDate: 2020-12-25 20:42:10 +0000

    MFC r361703:
    
    [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
    Sponsored by:   Tag1 Consulting, Inc.
    
    (cherry picked from commit 30dc2aebd7e88d43d620bba765edd21fcd20f3be)
---
 sys/conf/ldscript.powerpc64 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64
index 6ee7697ce3f8..e7c78c9eb1df 100644
--- a/sys/conf/ldscript.powerpc64
+++ b/sys/conf/ldscript.powerpc64
@@ -32,9 +32,6 @@ SECTIONS
   .interpX    : { *(.interp) 	} : NONE
   /DISCARD/   : { *(.interp)	} 
 
-  /* Also delete notes */
-  /DISCARD/   : { *(.note.*)	} 
-
   .hash          : { *(.hash)		}
   .dynsym        : { *(.dynsym)		}
   .dynstr        : { *(.dynstr)		}
@@ -46,6 +43,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     :


More information about the dev-commits-src-all mailing list