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