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