diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-12-29 20:30:10 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-12-29 20:30:10 +0000 |
commit | 70f654991aff94b542eaf5856c43563b5c0cad71 (patch) | |
tree | 1805e8fb2198d474f2b16ee4ba48e3549c4db741 /sys/conf/ldscript.powerpc64 | |
parent | 8469e0fe3529114f53b44cd78e187f01322eb6dc (diff) | |
download | src-70f654991aff94b542eaf5856c43563b5c0cad71.tar.gz src-70f654991aff94b542eaf5856c43563b5c0cad71.zip |
Add support for 64-bit PowerPC kernels to be directly loaded by kexec, which
is used as the bootloader on a number of PPC64 platforms. This involves the
following pieces:
- Making the first instruction a valid kernel entry point, since kexec
ignores the ELF entry value. This requires a separate section and linker
magic to prevent the linker from filling the beginning of the section
with stubs.
- Adding an entry point at 0x60 past the first instruction for systems
lacking firmware CPU shutdown support (notably PS3).
- Linker script changes to support the above.
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=327358
Diffstat (limited to 'sys/conf/ldscript.powerpc64')
-rw-r--r-- | sys/conf/ldscript.powerpc64 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64 index 82836699456e..025c65451972 100644 --- a/sys/conf/ldscript.powerpc64 +++ b/sys/conf/ldscript.powerpc64 @@ -8,8 +8,12 @@ SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); SECTIONS { - /* Read-only sections, merged into text segment: */ + /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */ + . = kernbase - 0x100; + .kboot : { *(.text.kboot) } + + /* Read-only sections, merged into text segment: */ . = kernbase; PROVIDE (begin = .); @@ -28,6 +32,9 @@ SECTIONS .interpX : { *(.interp) } : NONE /DISCARD/ : { *(.interp) } + /* Also delete notes */ + /DISCARD/ : { *(.note.*) } + .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } |