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