aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/ldscript.powerpc64
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2017-11-25 21:45:51 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2017-11-25 21:45:51 +0000
commit25449e73a11feff3f4ee886e8b185e542d98b620 (patch)
tree398267b6e42a4d782b8de105d300121493c179a0 /sys/conf/ldscript.powerpc64
parent5d8517002681a57da4f09bbdc2c90e9e2984cbce (diff)
Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for
the first instruction to be at the start of the text segment. This allows the kernel to be booted correctly by stock kexec-lite. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=326203
Diffstat (limited to 'sys/conf/ldscript.powerpc64')
-rw-r--r--sys/conf/ldscript.powerpc647
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64
index 23c93fd85fc0..250f54ec2095 100644
--- a/sys/conf/ldscript.powerpc64
+++ b/sys/conf/ldscript.powerpc64
@@ -10,7 +10,7 @@ SECTIONS
{
/* Read-only sections, merged into text segment: */
- . = kernbase + SIZEOF_HEADERS;
+ . = kernbase;
PROVIDE (begin = . - SIZEOF_HEADERS);
.text :
@@ -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) }