Files
s390-tools/zipl/boot/eckd2dump.lds.S
Mikhail Zaslonko 73f211ecb1 zipl/boot: Combine linker scripts for CCW DASD dumpers
Combine linker scripts for single volume and multi-volume ECKD dumpers
to avoid duplicating. Use C preprocessor to define conditional symbols.
Cleanup the generic stage2 linker script(stage2.lds). Since it is still
used for FBA and TAPE dumpers (fba2dump and tape2dump) the .stage2dump.tail
section should be preserved.

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2024-11-22 17:20:01 +01:00

81 lines
1.9 KiB
ArmAsm

/*
* Memory layout of stage 2 for ECKD DASD dump tool
* (single volume and multi volume)
* ===============================================
*
* General memory layout
* ---------------------
*
* 0x0000-0x1fff Lowcore
* 0x2000-0xafff Sections (load): head, text, data, rodata, rodata.str,
* stage2dump.tail, eckd2dump_mv.tail, bss
* 0xb000-0xdfff Memory allocation (heap)
* 0xe000-0xffff Stack
*
* Special memory locations
* ------------------------
*
* 0x78 Stage 2 description parameters
* 0x2018 Stage 2 entry point
* 0x4ff0 Stage 2 multi-volume dump parameters (eckd2dump_mv)
* 0x5000 Multi-volume dump parameters table (eckd2dump_mv)
* 0x9ff0 Stage 2 single volume dump parameters (eckd2dump_sv)
*/
#include "boot/loaders_layout.h"
SECTIONS
{
. = STAGE2_DESC;
__stage2_desc = .;
. = STAGE2_LOAD_ADDRESS;
.stage2.head : { *(.stage2.head) }
. = STAGE2_ENTRY;
.text.start : {
*(.text.start)
}
.text : { *(.text) }
__ex_table_start = .;
.ex_table : { *(.ex_table) }
__ex_table_stop = .;
.rodata : {*(.rodata) }
.data : { *(.data) }
. = STAGE2DUMP_TAIL_ADDRESS;
.stage2dump.tail : { *(.stage2dump.tail) }
#ifdef ECKD2DUMP_MV
. = ECKD2DUMP_MV_TAIL_ADDRESS;
.eckd2dump_mv.tail : { *(.eckd2dump_mv.tail) }
#endif
__bss_start = .;
.bss : { *(.bss) }
__bss_stop = .;
. = ECKD2DUMP_HEAP_ADDRESS;
__heap_start = .;
.heap : {
. += STAGE2_HEAP_SIZE;
ASSERT(__heap_stop - __heap_start == STAGE2_HEAP_SIZE,
"Heap section doesn't conform to the described memory layout");
}
__heap_stop = .;
. = ECKD2DUMP_STACK_ADDRESS;
__stack_start = .;
.stack : {
. += ECKD2DUMP_STACK_SIZE;
ASSERT(__stack_end - __stack_start == ECKD2DUMP_STACK_SIZE,
"Stack section doesn't conform to the described memory layout");
}
__stack_end = .;
/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
*(.interp)
*(.note.GNU-stack)
*(.note.package)
}
}