Loading...
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 _stext = .;
24 __init_begin = .;
25 INIT_TEXT_SECTION(0)
26 . = ALIGN(PAGE_SIZE);
27
28 .text :
29 {
30 TEXT_TEXT
31 SCHED_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.data : { INIT_DATA }
66 .data :
67 {
68 INIT_TASK_DATA(KERNEL_STACK_SIZE)
69 . = ALIGN(KERNEL_STACK_SIZE);
70 *(.data..init_irqstack)
71 DATA_DATA
72 *(.gnu.linkonce.d*)
73 CONSTRUCTORS
74 }
75 .data1 : { *(.data1) }
76 .ctors :
77 {
78 *(.ctors)
79 }
80 .dtors :
81 {
82 *(.dtors)
83 }
84
85 .got : { *(.got.plt) *(.got) }
86 .dynamic : { *(.dynamic) }
87 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
88 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
89 /* We want the small data sections together, so single-instruction offsets
90 can access them all, and initialized data all before uninitialized, so
91 we can shorten the on-disk segment size. */
92 .sdata : { *(.sdata) }
93 _edata = .;
94 PROVIDE (edata = .);
95 . = ALIGN(PAGE_SIZE);
96 __bss_start = .;
97 PROVIDE(_bss_start = .);
98 SBSS(0)
99 BSS(0)
100 _end = .;
101 PROVIDE (end = .);
102
103 STABS_DEBUG
104
105 DWARF_DEBUG
106
107 DISCARDS
108}
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 CPUIDLE_TEXT
39 LOCK_TEXT
40 IRQENTRY_TEXT
41 SOFTIRQENTRY_TEXT
42 *(.fixup)
43 /* .gnu.warning sections are handled specially by elf32.em. */
44 *(.gnu.warning)
45 *(.gnu.linkonce.t*)
46 }
47
48 . = ALIGN(PAGE_SIZE);
49 .syscall_stub : {
50 __syscall_stub_start = .;
51 *(.__syscall_stub*)
52 __syscall_stub_end = .;
53 }
54
55 /*
56 * These are needed even in a static link, even if they wind up being empty.
57 * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols.
58 */
59 .rel.plt : {
60 *(.rel.plt)
61 PROVIDE_HIDDEN(__rel_iplt_start = .);
62 *(.rel.iplt)
63 PROVIDE_HIDDEN(__rel_iplt_end = .);
64 }
65 .rela.plt : {
66 *(.rela.plt)
67 PROVIDE_HIDDEN(__rela_iplt_start = .);
68 *(.rela.iplt)
69 PROVIDE_HIDDEN(__rela_iplt_end = .);
70 }
71
72 #include <asm/common.lds.S>
73
74 __init_begin = .;
75 init.data : { INIT_DATA }
76 __init_end = .;
77
78 .data :
79 {
80 INIT_TASK_DATA(KERNEL_STACK_SIZE)
81 . = ALIGN(KERNEL_STACK_SIZE);
82 *(.data..init_irqstack)
83 DATA_DATA
84 *(.gnu.linkonce.d*)
85 CONSTRUCTORS
86 }
87 .data1 : { *(.data1) }
88 .ctors :
89 {
90 *(.ctors)
91 }
92 .dtors :
93 {
94 *(.dtors)
95 }
96
97 .got : { *(.got.plt) *(.got) }
98 .eh_frame : { KEEP (*(.eh_frame)) }
99 .dynamic : { *(.dynamic) }
100 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
101 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
102 /* We want the small data sections together, so single-instruction offsets
103 can access them all, and initialized data all before uninitialized, so
104 we can shorten the on-disk segment size. */
105 .sdata : { *(.sdata) }
106 _edata = .;
107 PROVIDE (edata = .);
108 . = ALIGN(PAGE_SIZE);
109 __bss_start = .;
110 PROVIDE(_bss_start = .);
111 SBSS(0)
112 BSS(0)
113 __bss_stop = .;
114 _end = .;
115 PROVIDE (end = .);
116
117 STABS_DEBUG
118 DWARF_DEBUG
119 ELF_DETAILS
120
121 DISCARDS
122}