1 /* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
5 #define LOAD_OFFSET __PAGE_OFFSET
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/thread_info.h>
11 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
13 ENTRY(phys_startup_32)
18 phys_startup_32 = startup_32 - LOAD_OFFSET;
20 _text = .; /* Text and read-only data */
21 .text : AT(ADDR(.text) - LOAD_OFFSET) {
29 _etext = .; /* End of text section */
31 . = ALIGN(16); /* Exception table */
32 __start___ex_table = .;
33 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
34 __stop___ex_table = .;
39 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
46 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) }
51 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
56 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
57 *(.data.cacheline_aligned)
60 _edata = .; /* End of data section */
62 . = ALIGN(THREAD_SIZE); /* init_task */
63 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
67 /* will be freed after init */
68 . = ALIGN(4096); /* Init code and data */
70 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
75 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) }
78 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) }
81 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
91 __con_initcall_start = .;
92 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
95 __con_initcall_end = .;
98 __alt_instructions = .;
99 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
102 __alt_instructions_end = .;
103 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) {
104 *(.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 : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
109 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
111 __initramfs_start = .;
112 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
116 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
120 /* freed after init ends here */
122 __bss_start = .; /* BSS */
123 .bss.page_aligned : AT(ADDR(.bss.page_aligned) - LOAD_OFFSET) {
126 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
134 /* This is where the kernel creates the early boot page tables */
138 /* Sections to be discarded */
143 /* Stabs debugging sections. */
144 .stab 0 : { *(.stab) }
145 .stabstr 0 : { *(.stabstr) }
146 .stab.excl 0 : { *(.stab.excl) }
147 .stab.exclstr 0 : { *(.stab.exclstr) }
148 .stab.index 0 : { *(.stab.index) }
149 .stab.indexstr 0 : { *(.stab.indexstr) }
150 .comment 0 : { *(.comment) }