1 /* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
5 #include <asm-generic/vmlinux.lds.h>
6 #include <asm/thread_info.h>
8 #include <linux/config.h>
10 #include <asm/asm_offsets.h>
12 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
18 . = __PAGE_OFFSET + 0x100000;
20 _text = .; /* Text and read-only data */
29 . = ALIGN(PAGE_SIZE_asm);
30 __entry_tramp_start = .;
31 . = FIX_ENTRY_TRAMPOLINE_0_addr;
32 __start___entry_text = .;
33 .entry.text : AT (__entry_tramp_start) { *(.entry.text) }
34 __entry_tramp_end = __entry_tramp_start + SIZEOF(.entry.text);
35 . = __entry_tramp_end;
36 . = ALIGN(PAGE_SIZE_asm);
38 .entry.text : { *(.entry.text) }
41 _etext = .; /* End of text section */
43 . = ALIGN(16); /* Exception table */
44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .;
56 . = ALIGN(PAGE_SIZE_asm);
58 .data_nosave : { *(.data.nosave) }
59 . = ALIGN(PAGE_SIZE_asm);
63 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
65 _edata = .; /* End of data section */
67 . = ALIGN(THREAD_SIZE); /* init_task */
68 .data.init_task : { *(.data.init_task) }
70 /* will be freed after init */
71 . = ALIGN(PAGE_SIZE_asm); /* Init code and data */
78 .init.data : { *(.init.data) }
81 .init.setup : { *(.init.setup) }
84 __param : { *(__param) }
97 __con_initcall_start = .;
98 .con_initcall.init : { *(.con_initcall.init) }
99 __con_initcall_end = .;
102 __alt_instructions = .;
103 .altinstructions : { *(.altinstructions) }
104 __alt_instructions_end = .;
105 .altinstr_replacement : { *(.altinstr_replacement) }
106 /* .exit.text is discard at runtime, not link time, to deal with references
107 from .altinstructions and .eh_frame */
108 .exit.text : { *(.exit.text) }
109 .exit.data : { *(.exit.data) }
110 . = ALIGN(PAGE_SIZE_asm);
111 __initramfs_start = .;
112 .init.ramfs : { *(.init.ramfs) }
116 .data.percpu : { *(.data.percpu) }
118 . = ALIGN(PAGE_SIZE_asm);
120 /* freed after init ends here */
122 . = ALIGN(PAGE_SIZE_asm);
123 .data.page_aligned_tss : { *(.data.tss) }
125 . = ALIGN(PAGE_SIZE_asm);
126 .data.page_aligned_default_ldt : { *(.data.default_ldt) }
128 . = ALIGN(PAGE_SIZE_asm);
129 .data.page_aligned_idt : { *(.data.idt) }
131 . = ALIGN(PAGE_SIZE_asm);
132 .data.page_aligned_gdt : { *(.data.gdt) }
134 __bss_start = .; /* BSS */
144 /* This is where the kernel creates the early boot page tables */
148 /* Sections to be discarded */
153 /* Stabs debugging sections. */
154 .stab 0 : { *(.stab) }
155 .stabstr 0 : { *(.stabstr) }
156 .stab.excl 0 : { *(.stab.excl) }
157 .stab.exclstr 0 : { *(.stab.exclstr) }
158 .stab.index 0 : { *(.stab.index) }
159 .stab.indexstr 0 : { *(.stab.indexstr) }
160 .comment 0 : { *(.comment) }