1 /* ld script to make s390 Linux kernel
5 #include <asm/thread_info.h>
9 * Put .bss..swapper_pg_dir as the first thing in .bss. This will
10 * make sure it has 16k alignment.
12 #define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
14 /* Handle ro_after_init data on our own. */
15 #define RO_AFTER_INIT_DATA
17 #include <asm-generic/vmlinux.lds.h>
19 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
20 OUTPUT_ARCH(s390:64-bit)
25 text PT_LOAD FLAGS(5); /* R_E */
26 data PT_LOAD FLAGS(7); /* RWE */
27 note PT_NOTE FLAGS(0); /* ___ */
34 /* Text and read-only data */
37 * E.g. perf doesn't like symbols starting at address zero,
38 * therefore skip the initial PSW and channel program located
39 * at address zero and let _text start at 0x200.
54 _etext = .; /* End of text section */
58 .dummy : { *(.dummy) } :data
60 RO_DATA_SECTION(PAGE_SIZE)
62 #ifdef CONFIG_SHARED_KERNEL
63 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
67 _eshared = .; /* End of shareable data */
68 _sdata = .; /* Start of data section */
71 __start_ro_after_init = .;
72 .data..ro_after_init : {
73 *(.data..ro_after_init)
77 __end_ro_after_init = .;
79 RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
81 _edata = .; /* End of data section */
83 /* will be freed after init */
84 . = ALIGN(PAGE_SIZE); /* Init code and data */
88 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
89 VMLINUX_SYMBOL(_sinittext) = . ;
92 VMLINUX_SYMBOL(_einittext) = . ;
96 * .exit.text is discarded at runtime, not link time,
97 * to deal with references from __bug_table
107 /* early.c uses stsi, which requires page aligned data. */
108 . = ALIGN(PAGE_SIZE);
109 INIT_DATA_SECTION(0x100)
111 PERCPU_SECTION(0x100)
112 . = ALIGN(PAGE_SIZE);
113 __init_end = .; /* freed after init ends here */
115 BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
119 /* Debugging sections. */
123 /* Sections to be discarded */