mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
61f3f8fc22
The purgatory is compiled into the vmlinux and keept in memory all the time during runtime. Thus any section not needed to load the purgatory unnecessarily bloats up its foot print in file- and memorysize. Reduce the purgatory size by stripping the unneeded sections from the purgatory. This reduces the purgatories size by ~33%. Signed-off-by: Philipp Rudo <prudo@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
55 lines
763 B
ArmAsm
55 lines
763 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
|
OUTPUT_ARCH(s390:64-bit)
|
|
|
|
ENTRY(purgatory_start)
|
|
|
|
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 = . ;
|
|
}
|
|
|
|
. = ALIGN(256);
|
|
.bss : {
|
|
_bss = . ;
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
. = ALIGN(8); /* For convenience during zeroing */
|
|
_ebss = .;
|
|
}
|
|
_end = .;
|
|
|
|
/* Sections to be discarded */
|
|
/DISCARD/ : {
|
|
*(.eh_frame)
|
|
*(*__ksymtab*)
|
|
*(___kcrctab*)
|
|
}
|
|
}
|