Commit | Line | Data |
---|---|---|
1da177e4 | 1 | #include <asm-generic/vmlinux.lds.h> |
a7dfa940 | 2 | #include <asm/page.h> |
1da177e4 LT |
3 | |
4 | OUTPUT_FORMAT(ELF_FORMAT) | |
5 | OUTPUT_ARCH(ELF_ARCH) | |
6 | ENTRY(_start) | |
7 | jiffies = jiffies_64; | |
8 | ||
9 | SECTIONS | |
10 | { | |
23bbd586 | 11 | /* This must contain the right address - not quite the default ELF one.*/ |
1da177e4 | 12 | PROVIDE (__executable_start = START); |
23bbd586 JD |
13 | /* Static binaries stick stuff here, like the sigreturn trampoline, |
14 | * invisibly to objdump. So, just make __binary_start equal to the very | |
15 | * beginning of the executable, and if there are unmapped pages after this, | |
16 | * they are forever unusable. | |
17 | */ | |
18 | __binary_start = START; | |
1da177e4 | 19 | |
23bbd586 | 20 | . = START + SIZEOF_HEADERS; |
1da177e4 | 21 | |
d1480c56 | 22 | _text = .; |
6915e04f | 23 | INIT_TEXT_SECTION(0) |
a7dfa940 | 24 | . = ALIGN(PAGE_SIZE); |
d67b569f | 25 | |
1da177e4 LT |
26 | .text : |
27 | { | |
a214a8c6 | 28 | _stext = .; |
7664709b | 29 | TEXT_TEXT |
1da177e4 LT |
30 | SCHED_TEXT |
31 | LOCK_TEXT | |
32 | *(.fixup) | |
33 | /* .gnu.warning sections are handled specially by elf32.em. */ | |
34 | *(.gnu.warning) | |
35 | *(.gnu.linkonce.t*) | |
c7ec16da | 36 | } |
d67b569f | 37 | |
a7dfa940 | 38 | . = ALIGN(PAGE_SIZE); |
c7ec16da JD |
39 | .syscall_stub : { |
40 | __syscall_stub_start = .; | |
41 | *(.__syscall_stub*) | |
42 | __syscall_stub_end = .; | |
1da177e4 LT |
43 | } |
44 | ||
aa5fb4db RM |
45 | /* |
46 | * These are needed even in a static link, even if they wind up being empty. | |
47 | * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols. | |
48 | */ | |
49 | .rel.plt : { | |
50 | *(.rel.plt) | |
51 | PROVIDE_HIDDEN(__rel_iplt_start = .); | |
52 | *(.rel.iplt) | |
53 | PROVIDE_HIDDEN(__rel_iplt_end = .); | |
54 | } | |
55 | .rela.plt : { | |
56 | *(.rela.plt) | |
57 | PROVIDE_HIDDEN(__rela_iplt_start = .); | |
58 | *(.rela.iplt) | |
59 | PROVIDE_HIDDEN(__rela_iplt_end = .); | |
60 | } | |
61 | ||
37185b33 | 62 | #include <asm/common.lds.S> |
1da177e4 | 63 | |
a214a8c6 | 64 | __init_begin = .; |
01ba2bdc | 65 | init.data : { INIT_DATA } |
a214a8c6 JL |
66 | __init_end = .; |
67 | ||
1da177e4 LT |
68 | .data : |
69 | { | |
5d150a97 | 70 | INIT_TASK_DATA(KERNEL_STACK_SIZE) |
c14b8494 | 71 | . = ALIGN(KERNEL_STACK_SIZE); |
9d1578a3 | 72 | *(.data..init_irqstack) |
ca967258 | 73 | DATA_DATA |
1da177e4 LT |
74 | *(.gnu.linkonce.d*) |
75 | CONSTRUCTORS | |
76 | } | |
77 | .data1 : { *(.data1) } | |
78 | .ctors : | |
79 | { | |
80 | *(.ctors) | |
81 | } | |
82 | .dtors : | |
83 | { | |
84 | *(.dtors) | |
85 | } | |
86 | ||
87 | .got : { *(.got.plt) *(.got) } | |
88 | .dynamic : { *(.dynamic) } | |
ba9950c8 JD |
89 | .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } |
90 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } | |
1da177e4 LT |
91 | /* We want the small data sections together, so single-instruction offsets |
92 | can access them all, and initialized data all before uninitialized, so | |
93 | we can shorten the on-disk segment size. */ | |
94 | .sdata : { *(.sdata) } | |
95 | _edata = .; | |
96 | PROVIDE (edata = .); | |
a7dfa940 | 97 | . = ALIGN(PAGE_SIZE); |
5d150a97 TA |
98 | __bss_start = .; |
99 | PROVIDE(_bss_start = .); | |
100 | SBSS(0) | |
101 | BSS(0) | |
a214a8c6 | 102 | __bss_stop = .; |
a7d0c210 | 103 | _end = .; |
1da177e4 | 104 | PROVIDE (end = .); |
a7d0c210 PBG |
105 | |
106 | STABS_DEBUG | |
107 | ||
108 | DWARF_DEBUG | |
405d967d | 109 | |
023bf6f1 | 110 | DISCARDS |
1da177e4 | 111 | } |