vmlinux.lds.S 2.6 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4
/* ld script to make s390 Linux kernel
 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
 */

5
#include <asm/page.h>
L
Linus Torvalds 已提交
6 7
#include <asm-generic/vmlinux.lds.h>

8
#ifndef CONFIG_64BIT
L
Linus Torvalds 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
OUTPUT_ARCH(s390)
ENTRY(_start)
jiffies = jiffies_64 + 4;
#else
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
OUTPUT_ARCH(s390:64-bit)
ENTRY(_start)
jiffies = jiffies_64;
#endif

SECTIONS
{
S
Sam Ravnborg 已提交
22 23 24 25
	. = 0x00000000;
	.text : {
	_text = .;		/* Text and read-only data */
		*(.text.head)
26
	TEXT_TEXT
S
Sam Ravnborg 已提交
27 28 29 30 31
		SCHED_TEXT
		LOCK_TEXT
		KPROBES_TEXT
		*(.fixup)
		*(.gnu.warning)
L
Linus Torvalds 已提交
32 33
	} = 0x0700

S
Sam Ravnborg 已提交
34
	_etext = .;		/* End of text section */
L
Linus Torvalds 已提交
35

S
Sam Ravnborg 已提交
36
	RODATA
L
Linus Torvalds 已提交
37 38

#ifdef CONFIG_SHARED_KERNEL
39
	. = ALIGN(0x100000);	/* VM shared segments are 1MB aligned */
40
#endif
L
Linus Torvalds 已提交
41

42
	. = ALIGN(PAGE_SIZE);
S
Sam Ravnborg 已提交
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
	_eshared = .;		/* End of shareable data */

	. = ALIGN(16);		/* Exception table */
	__ex_table : {
		__start___ex_table = .;
		*(__ex_table)
		__stop___ex_table = .;
	}

	NOTES
	BUG_TABLE

	.data : {		/* Data */
		DATA_DATA
		CONSTRUCTORS
	}

60
	. = ALIGN(PAGE_SIZE);
S
Sam Ravnborg 已提交
61 62 63 64
	.data_nosave : {
	__nosave_begin = .;
		*(.data.nosave)
	}
65
	. = ALIGN(PAGE_SIZE);
S
Sam Ravnborg 已提交
66 67
	__nosave_end = .;

68
	. = ALIGN(PAGE_SIZE);
S
Sam Ravnborg 已提交
69 70 71 72
	.data.page_aligned : {
		*(.data.idt)
	}

73
	. = ALIGN(0x100);
S
Sam Ravnborg 已提交
74 75 76 77
	.data.cacheline_aligned : {
		*(.data.cacheline_aligned)
	}

78
	. = ALIGN(0x100);
S
Sam Ravnborg 已提交
79 80 81 82 83
	.data.read_mostly : {
		*(.data.read_mostly)
	}
	_edata = .;		/* End of data section */

84
	. = ALIGN(2 * PAGE_SIZE);	/* init_task */
S
Sam Ravnborg 已提交
85 86 87 88 89
	.data.init_task : {
		*(.data.init_task)
	}

	/* will be freed after init */
90
	. = ALIGN(PAGE_SIZE);	/* Init code and data */
S
Sam Ravnborg 已提交
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
	__init_begin = .;
	.init.text : {
		_sinittext = .;
		*(.init.text)
		_einittext = .;
	}
	/*
	 * .exit.text is discarded at runtime, not link time,
	 * to deal with references from __bug_table
	*/
	.exit.text : {
		*(.exit.text)
	}

	.init.data : {
		*(.init.data)
	}
108
	. = ALIGN(0x100);
S
Sam Ravnborg 已提交
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
	.init.setup : {
		__setup_start = .;
		*(.init.setup)
		__setup_end = .;
	}
	.initcall.init : {
		__initcall_start = .;
		INITCALLS
		__initcall_end = .;
	}

	.con_initcall.init : {
		__con_initcall_start = .;
		*(.con_initcall.init)
		__con_initcall_end = .;
	}
	SECURITY_INIT
126 127

#ifdef CONFIG_BLK_DEV_INITRD
128
	. = ALIGN(0x100);
S
Sam Ravnborg 已提交
129 130 131 132 133 134
	.init.ramfs : {
		__initramfs_start = .;
		*(.init.ramfs)
		. = ALIGN(2);
		__initramfs_end = .;
	}
135
#endif
S
Sam Ravnborg 已提交
136

137 138
	PERCPU(PAGE_SIZE)
	. = ALIGN(PAGE_SIZE);
S
Sam Ravnborg 已提交
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
	__init_end = .;		/* freed after init ends here */

	/* BSS */
	.bss : {
		__bss_start = .;
		*(.bss)
		. = ALIGN(2);
		__bss_stop = .;
	}

	_end = . ;

	/* Sections to be discarded */
	/DISCARD/ : {
		*(.exit.data)
		*(.exitcall.exit)
	}

	/* Debugging sections.	*/
	STABS_DEBUG
	DWARF_DEBUG
L
Linus Torvalds 已提交
160
}