aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Bergren <bdragon@FreeBSD.org>2020-06-01 19:40:59 +0000
committerBrandon Bergren <bdragon@FreeBSD.org>2020-12-25 20:42:10 +0000
commitefc7664f9ba1322ab5ba47a1a64e29fa661021ed (patch)
tree0d36c9daedb4f96d47309e8c148f317f5692815b
parent5c51ee529fd49ba9c54af691fc8f1228fa8f18eb (diff)
downloadsrc-efc7664f9ba1322ab5ba47a1a64e29fa661021ed.tar.gz
src-efc7664f9ba1322ab5ba47a1a64e29fa661021ed.zip
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)
-rw-r--r--sys/conf/ldscript.powerpc647
1 files 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 :