forked from Minki/linux
d1b52a4388
Introduce .boot.data section which is "shared" between the decompressor code and the decompressed kernel. The decompressor will store values in it, and copy over to the decompressed image before starting it. This method allows to avoid using pre-defined addresses and other hacks to pass values between those boot phases. .boot.data section is a part of init data, and will be freed after kernel initialization is complete. For uncompressed kernel image, .boot.data section is basically the same as .init.data Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
78 lines
1.2 KiB
ArmAsm
78 lines
1.2 KiB
ArmAsm
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
#include <asm/vmlinux.lds.h>
|
|
|
|
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
|
OUTPUT_ARCH(s390:64-bit)
|
|
|
|
ENTRY(startup)
|
|
|
|
SECTIONS
|
|
{
|
|
. = 0;
|
|
.head.text : {
|
|
_head = . ;
|
|
HEAD_TEXT
|
|
_ehead = . ;
|
|
}
|
|
.text : {
|
|
_text = .; /* Text */
|
|
*(.text)
|
|
*(.text.*)
|
|
_etext = . ;
|
|
}
|
|
.rodata : {
|
|
_rodata = . ;
|
|
*(.rodata) /* read-only data */
|
|
*(.rodata.*)
|
|
_erodata = . ;
|
|
}
|
|
.data : {
|
|
_data = . ;
|
|
*(.data)
|
|
*(.data.*)
|
|
_edata = . ;
|
|
}
|
|
BOOT_DATA
|
|
|
|
/*
|
|
* uncompressed image info used by the decompressor it should match
|
|
* struct vmlinux_info. It comes from .vmlinux.info section of
|
|
* uncompressed vmlinux in a form of info.o
|
|
*/
|
|
. = ALIGN(8);
|
|
.vmlinux.info : {
|
|
_vmlinux_info = .;
|
|
*(.vmlinux.info)
|
|
}
|
|
|
|
#ifdef CONFIG_KERNEL_UNCOMPRESSED
|
|
. = 0x100000;
|
|
#else
|
|
. = ALIGN(8);
|
|
#endif
|
|
.rodata.compressed : {
|
|
_compressed_start = .;
|
|
*(.vmlinux.bin.compressed)
|
|
_compressed_end = .;
|
|
}
|
|
. = ALIGN(256);
|
|
.bss : {
|
|
_bss = . ;
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
. = ALIGN(8); /* For convenience during zeroing */
|
|
_ebss = .;
|
|
}
|
|
_end = .;
|
|
|
|
/* Sections to be discarded */
|
|
/DISCARD/ : {
|
|
*(.eh_frame)
|
|
*(__ex_table)
|
|
*(*__ksymtab*)
|
|
*(___kcrctab*)
|
|
}
|
|
}
|