xref: /kvm-unit-tests/s390x/snippets/c/flat.lds.S (revision bb4c17e3783ce4578065f8ea55b6227dc0f53ad8)
1#include <asm/asm-offsets.h>
2
3SECTIONS
4{
5	.lowcore : {
6		/*
7		 * Initial short psw for disk boot, with 31 bit addressing for
8		 * non z/Arch environment compatibility and the instruction
9		 * address 0x4000 (cstart.S .init).
10		 */
11		. = 0;
12		lowcore = .;
13		 LONG(0x00080000)
14		 LONG(0x80004000)
15		 /* Restart new PSW for booting via PSW restart. */
16		 . = 0x1a0;
17		 QUAD(0x0000000180000000)
18		 QUAD(0x0000000000004000)
19	}
20	. = 0x4000;
21	/*
22	 * The stack grows down from 0x4000 to 0x2000, we pre-allocoate
23	 * a frame via the -STACK_FRAME_SIZE.
24	 */
25	stackptr = . - STACK_FRAME_SIZE;
26	stacktop = .;
27	/* Start text 0x4000 */
28	.text : {
29		*(.init)
30		*(.text)
31		*(.text.*)
32	}
33	. = ALIGN(4K);
34	etext = .;
35	/* End text */
36	/* Start data */
37	.data : {
38		*(.data)
39		*(.data.rel*)
40	}
41	. = ALIGN(16);
42	.rodata : { *(.rodata) *(.rodata.*) }
43	. = ALIGN(16);
44	.bss : { *(.bss) }
45	/* End data */
46}
47