blob: dd5355500bdccdc66423761a0dd69ce88baca6bd [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <asm-generic/vmlinux.lds.h>
2
3OUTPUT_FORMAT(ELF_FORMAT)
4OUTPUT_ARCH(ELF_ARCH)
5ENTRY(_start)
6jiffies = jiffies_64;
7
8SECTIONS
9{
10 /*This must contain the right address - not quite the default ELF one.*/
11 PROVIDE (__executable_start = START);
12 . = START + SIZEOF_HEADERS;
13
14 /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
15 * is remapped.*/
16 __binary_start = .;
17#ifdef MODE_TT
18 .thread_private : {
19 __start_thread_private = .;
20 errno = .;
21 . += 4;
22 arch/um/kernel/tt/unmap_fin.o (.data)
23 __end_thread_private = .;
24 }
25 . = ALIGN(4096);
26 .remap : { arch/um/kernel/tt/unmap_fin.o (.text) }
27
28 /* We want it only if we are in MODE_TT. In both cases, however, when MODE_TT
29 * is off the resulting binary segfaults.*/
30
31 . = ALIGN(4096); /* Init code and data */
32#endif
33
34 _stext = .;
35 __init_begin = .;
36 .init.text : {
37 _sinittext = .;
38 *(.init.text)
39 _einittext = .;
40 }
41 . = ALIGN(4096);
42 .text :
43 {
44 *(.text)
45 SCHED_TEXT
46 LOCK_TEXT
47 *(.fixup)
48 /* .gnu.warning sections are handled specially by elf32.em. */
49 *(.gnu.warning)
50 *(.gnu.linkonce.t*)
51 }
52
53 #include "asm/common.lds.S"
54
55 init.data : { *(init.data) }
56 .data :
57 {
58 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
59 *(.data.init_task)
60 *(.data)
61 *(.gnu.linkonce.d*)
62 CONSTRUCTORS
63 }
64 .data1 : { *(.data1) }
65 .ctors :
66 {
67 *(.ctors)
68 }
69 .dtors :
70 {
71 *(.dtors)
72 }
73
74 .got : { *(.got.plt) *(.got) }
75 .dynamic : { *(.dynamic) }
Jeff Dikeba9950c2005-05-20 13:59:07 -070076 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
77 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 /* We want the small data sections together, so single-instruction offsets
79 can access them all, and initialized data all before uninitialized, so
80 we can shorten the on-disk segment size. */
81 .sdata : { *(.sdata) }
82 _edata = .;
83 PROVIDE (edata = .);
84 . = ALIGN(0x1000);
85 .sbss :
86 {
87 __bss_start = .;
88 PROVIDE(_bss_start = .);
89 *(.sbss)
90 *(.scommon)
91 }
92 .bss :
93 {
94 *(.dynbss)
95 *(.bss)
96 *(COMMON)
97 }
98 _end = . ;
99 PROVIDE (end = .);
100 /* Stabs debugging sections. */
101 .stab 0 : { *(.stab) }
102 .stabstr 0 : { *(.stabstr) }
103 .stab.excl 0 : { *(.stab.excl) }
104 .stab.exclstr 0 : { *(.stab.exclstr) }
105 .stab.index 0 : { *(.stab.index) }
106 .stab.indexstr 0 : { *(.stab.indexstr) }
107 .comment 0 : { *(.comment) }
108}