| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* ld script to make s390 Linux kernel | 
 | 2 |  * Written by Martin Schwidefsky (schwidefsky@de.ibm.com) | 
 | 3 |  */ | 
 | 4 |  | 
 | 5 | #include <asm-generic/vmlinux.lds.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 |  | 
| Martin Schwidefsky | 347a8dc | 2006-01-06 00:19:28 -0800 | [diff] [blame] | 7 | #ifndef CONFIG_64BIT | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") | 
 | 9 | OUTPUT_ARCH(s390) | 
 | 10 | ENTRY(_start) | 
 | 11 | jiffies = jiffies_64 + 4; | 
 | 12 | #else | 
 | 13 | OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") | 
 | 14 | OUTPUT_ARCH(s390:64-bit) | 
 | 15 | ENTRY(_start) | 
 | 16 | jiffies = jiffies_64; | 
 | 17 | #endif | 
 | 18 |  | 
 | 19 | SECTIONS | 
 | 20 | { | 
 | 21 |   . = 0x00000000; | 
 | 22 |   _text = .;			/* Text and read-only data */ | 
 | 23 |   .text : { | 
| Heiko Carstens | e62133b | 2007-07-27 12:29:13 +0200 | [diff] [blame] | 24 | 	*(.text.head) | 
| Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 25 | 	TEXT_TEXT | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | 	SCHED_TEXT | 
 | 27 | 	LOCK_TEXT | 
| Michael Grundy | 4ba069b | 2006-09-20 15:58:39 +0200 | [diff] [blame] | 28 | 	KPROBES_TEXT | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | 	*(.fixup) | 
 | 30 | 	*(.gnu.warning) | 
 | 31 | 	} = 0x0700 | 
 | 32 |  | 
 | 33 |   _etext = .;			/* End of text section */ | 
 | 34 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 |   RODATA | 
 | 36 |  | 
 | 37 | #ifdef CONFIG_SHARED_KERNEL | 
 | 38 |   . = ALIGN(1048576);		/* VM shared segments are 1MB aligned */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | #endif | 
 | 40 |  | 
| Heiko Carstens | 162e006 | 2007-02-05 21:18:41 +0100 | [diff] [blame] | 41 |   . = ALIGN(4096); | 
 | 42 |   _eshared = .;			/* End of shareable data */ | 
 | 43 |  | 
| Hongjie Yang | fe355b7 | 2007-02-05 21:18:24 +0100 | [diff] [blame] | 44 |   . = ALIGN(16);		/* Exception table */ | 
 | 45 |   __start___ex_table = .; | 
 | 46 |   __ex_table : { *(__ex_table) } | 
 | 47 |   __stop___ex_table = .; | 
 | 48 |  | 
| Roland McGrath | 86ead9c | 2007-07-19 01:48:39 -0700 | [diff] [blame] | 49 |   NOTES | 
 | 50 |  | 
| Heiko Carstens | c0007f1 | 2007-04-27 16:01:42 +0200 | [diff] [blame] | 51 |   BUG_TABLE | 
 | 52 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 |   .data : {			/* Data */ | 
| Sam Ravnborg | ca96725 | 2007-05-17 13:38:44 +0200 | [diff] [blame] | 54 | 	DATA_DATA | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | 	CONSTRUCTORS | 
 | 56 | 	} | 
 | 57 |  | 
 | 58 |   . = ALIGN(4096); | 
 | 59 |   __nosave_begin = .; | 
 | 60 |   .data_nosave : { *(.data.nosave) } | 
 | 61 |   . = ALIGN(4096); | 
 | 62 |   __nosave_end = .; | 
 | 63 |  | 
 | 64 |   . = ALIGN(4096); | 
 | 65 |   .data.page_aligned : { *(.data.idt) } | 
 | 66 |  | 
| Christian Borntraeger | 58268b9 | 2006-04-27 18:40:24 -0700 | [diff] [blame] | 67 |   . = ALIGN(256); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 |   .data.cacheline_aligned : { *(.data.cacheline_aligned) } | 
 | 69 |  | 
| Christian Borntraeger | 58268b9 | 2006-04-27 18:40:24 -0700 | [diff] [blame] | 70 |   . = ALIGN(256); | 
 | 71 |   .data.read_mostly : { *(.data.read_mostly) } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 |   _edata = .;			/* End of data section */ | 
 | 73 |  | 
 | 74 |   . = ALIGN(8192);		/* init_task */ | 
 | 75 |   .data.init_task : { *(.data.init_task) } | 
 | 76 |  | 
 | 77 |   /* will be freed after init */ | 
 | 78 |   . = ALIGN(4096);		/* Init code and data */ | 
 | 79 |   __init_begin = .; | 
 | 80 |   .init.text : {  | 
 | 81 | 	_sinittext = .; | 
 | 82 | 	*(.init.text) | 
 | 83 | 	_einittext = .; | 
 | 84 |   } | 
| Heiko Carstens | c0007f1 | 2007-04-27 16:01:42 +0200 | [diff] [blame] | 85 |   /* | 
 | 86 |    * .exit.text is discarded at runtime, not link time, | 
 | 87 |    * to deal with references from __bug_table | 
 | 88 |    */ | 
 | 89 |   .exit.text :	 { *(.exit.text) } | 
 | 90 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 |   .init.data : { *(.init.data) } | 
 | 92 |   . = ALIGN(256); | 
 | 93 |   __setup_start = .; | 
 | 94 |   .init.setup : { *(.init.setup) } | 
 | 95 |   __setup_end = .; | 
 | 96 |   __initcall_start = .; | 
 | 97 |   .initcall.init : { | 
| Andrew Morton | 61ce1ef | 2006-10-27 11:41:44 -0700 | [diff] [blame] | 98 | 	INITCALLS | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 |   } | 
 | 100 |   __initcall_end = .; | 
 | 101 |   __con_initcall_start = .; | 
 | 102 |   .con_initcall.init : { *(.con_initcall.init) } | 
 | 103 |   __con_initcall_end = .; | 
 | 104 |   SECURITY_INIT | 
| Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 105 |  | 
 | 106 | #ifdef CONFIG_BLK_DEV_INITRD | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 |   . = ALIGN(256); | 
 | 108 |   __initramfs_start = .; | 
 | 109 |   .init.ramfs : { *(.init.initramfs) } | 
 | 110 |   . = ALIGN(2); | 
 | 111 |   __initramfs_end = .; | 
| Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 112 | #endif | 
| Fenghua Yu | 5fb7dc3 | 2007-07-19 01:48:12 -0700 | [diff] [blame] | 113 |   PERCPU(4096) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 |   . = ALIGN(4096); | 
 | 115 |   __init_end = .; | 
 | 116 |   /* freed after init ends here */ | 
 | 117 |  | 
 | 118 |   __bss_start = .;		/* BSS */ | 
 | 119 |   .bss : { *(.bss) } | 
 | 120 |   . = ALIGN(2); | 
 | 121 |   __bss_stop = .; | 
 | 122 |  | 
 | 123 |   _end = . ; | 
 | 124 |  | 
 | 125 |   /* Sections to be discarded */ | 
 | 126 |   /DISCARD/ : { | 
| Heiko Carstens | c0007f1 | 2007-04-27 16:01:42 +0200 | [diff] [blame] | 127 | 	*(.exit.data) *(.exitcall.exit) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | 	} | 
 | 129 |  | 
 | 130 |   /* Stabs debugging sections.  */ | 
 | 131 |   .stab 0 : { *(.stab) } | 
 | 132 |   .stabstr 0 : { *(.stabstr) } | 
 | 133 |   .stab.excl 0 : { *(.stab.excl) } | 
 | 134 |   .stab.exclstr 0 : { *(.stab.exclstr) } | 
 | 135 |   .stab.index 0 : { *(.stab.index) } | 
 | 136 |   .stab.indexstr 0 : { *(.stab.indexstr) } | 
 | 137 |   .comment 0 : { *(.comment) } | 
 | 138 | } |