mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/boot: Improve linker scripts
Output all text input sections into one text section and map all input sections .bss.* .text.*, .rodata.*, and .data.* as it's done by the default linker script [1]. In addition, make the linker script easier to read by replacing the magic value of 32 with 'SIZEOF(.sb.trailer)'. [1] Check the output of 'ld --verbose'. Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
35e539a428
commit
a1126352ec
@@ -34,26 +34,29 @@ SECTIONS
|
||||
_stage3_parms = .;
|
||||
|
||||
. = STAGE3_ENTRY;
|
||||
.text.start : { *(.text.start) }
|
||||
.text : { *(.text) }
|
||||
.text : {
|
||||
*(.text.start)
|
||||
*(.text .text.*)
|
||||
}
|
||||
__ex_table_start = .;
|
||||
.ex_table : { *(.ex_table) }
|
||||
__ex_table_stop = .;
|
||||
|
||||
__bss_start = .;
|
||||
.bss : { *(.bss) }
|
||||
.bss : { *(.bss .bss.*) }
|
||||
__bss_stop = .;
|
||||
.rodata : {*(.rodata) }
|
||||
.data : { *(.data) }
|
||||
.rodata : {*(.rodata .rodata.*) }
|
||||
.data : { *(.data .data.*) }
|
||||
|
||||
/* Trailer needed for Secure Boot */
|
||||
. = COMMAND_LINE_EXTRA - 32;
|
||||
. = COMMAND_LINE_EXTRA - SIZEOF(.sb.trailer);
|
||||
.sb.trailer : {
|
||||
QUAD(0x0000c00000000000)
|
||||
QUAD(STAGE3_ENTRY + PSW_LOAD)
|
||||
QUAD(STAGE3_ENTRY)
|
||||
QUAD(0x000000207a49504c)
|
||||
}
|
||||
ASSERT(SIZEOF(.sb.trailer) == 32, "Invalid .sb.trailer size")
|
||||
|
||||
. = COMMAND_LINE_EXTRA;
|
||||
.cmdline_extra : {
|
||||
|
||||
Reference in New Issue
Block a user