GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / um / kernel / uml.lds.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <asm-generic/vmlinux.lds.h>
3 #include <asm/page.h>
4
5 OUTPUT_FORMAT(ELF_FORMAT)
6 OUTPUT_ARCH(ELF_ARCH)
7 ENTRY(_start)
8 jiffies = jiffies_64;
9
10 VERSION {
11   {
12     local: *;
13   };
14 }
15
16 SECTIONS
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
29   _text = .;
30   INIT_TEXT_SECTION(0)
31   . = ALIGN(PAGE_SIZE);
32
33   .text      :
34   {
35     _stext = .;
36     TEXT_TEXT
37     SCHED_TEXT
38     CPUIDLE_TEXT
39     LOCK_TEXT
40     *(.fixup)
41     /* .gnu.warning sections are handled specially by elf32.em.  */
42     *(.gnu.warning)
43     *(.gnu.linkonce.t*)
44   }
45
46   . = ALIGN(PAGE_SIZE);
47   .syscall_stub : {
48         __syscall_stub_start = .;
49         *(.__syscall_stub*)
50         __syscall_stub_end = .;
51   }
52
53   /*
54    * These are needed even in a static link, even if they wind up being empty.
55    * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols.
56    */
57   .rel.plt : {
58         *(.rel.plt)
59         PROVIDE_HIDDEN(__rel_iplt_start = .);
60         *(.rel.iplt)
61         PROVIDE_HIDDEN(__rel_iplt_end = .);
62   }
63   .rela.plt : {
64         *(.rela.plt)
65         PROVIDE_HIDDEN(__rela_iplt_start = .);
66         *(.rela.iplt)
67         PROVIDE_HIDDEN(__rela_iplt_end = .);
68   }
69
70   #include <asm/common.lds.S>
71
72   __init_begin = .;
73   init.data : { INIT_DATA }
74   __init_end = .;
75
76   .data    :
77   {
78     INIT_TASK_DATA(KERNEL_STACK_SIZE)
79     . = ALIGN(KERNEL_STACK_SIZE);
80     *(.data..init_irqstack)
81     DATA_DATA
82     *(.gnu.linkonce.d*)
83     CONSTRUCTORS
84   }
85   .data1   : { *(.data1) }
86   .ctors         :
87   {
88     *(.ctors)
89   }
90   .dtors         :
91   {
92     *(.dtors)
93   }
94
95   .got           : { *(.got.plt) *(.got) }
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
116   DWARF_DEBUG
117
118   DISCARDS
119 }