xref: /openbmc/linux/arch/um/kernel/uml.lds.S (revision a1e58bbd)
1#include <asm-generic/vmlinux.lds.h>
2
3OUTPUT_FORMAT(ELF_FORMAT)
4OUTPUT_ARCH(ELF_ARCH)
5ENTRY(_start)
6jiffies = jiffies_64;
7
8SECTIONS
9{
10  /* This must contain the right address - not quite the default ELF one.*/
11  PROVIDE (__executable_start = START);
12  /* Static binaries stick stuff here, like the sigreturn trampoline,
13   * invisibly to objdump.  So, just make __binary_start equal to the very
14   * beginning of the executable, and if there are unmapped pages after this,
15   * they are forever unusable.
16   */
17  __binary_start = START;
18
19  . = START + SIZEOF_HEADERS;
20
21  _text = .;
22  _stext = .;
23  __init_begin = .;
24  .init.text : {
25	_sinittext = .;
26	INIT_TEXT
27	_einittext = .;
28  }
29  . = ALIGN(4096);
30
31  .text      :
32  {
33    TEXT_TEXT
34    SCHED_TEXT
35    LOCK_TEXT
36    *(.fixup)
37    /* .gnu.warning sections are handled specially by elf32.em.  */
38    *(.gnu.warning)
39    *(.gnu.linkonce.t*)
40  }
41
42  . = ALIGN(4096);
43  .syscall_stub : {
44	__syscall_stub_start = .;
45	*(.__syscall_stub*)
46	__syscall_stub_end = .;
47  }
48
49  #include "asm/common.lds.S"
50
51  init.data : { INIT_DATA }
52  .data    :
53  {
54    . = ALIGN(KERNEL_STACK_SIZE);		/* init_task */
55    *(.data.init_task)
56    . = ALIGN(KERNEL_STACK_SIZE);
57    *(.data.init_irqstack)
58    DATA_DATA
59    *(.gnu.linkonce.d*)
60    CONSTRUCTORS
61  }
62  .data1   : { *(.data1) }
63  .ctors         :
64  {
65    *(.ctors)
66  }
67  .dtors         :
68  {
69    *(.dtors)
70  }
71
72  .got           : { *(.got.plt) *(.got) }
73  .dynamic       : { *(.dynamic) }
74  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
75  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
76  /* We want the small data sections together, so single-instruction offsets
77     can access them all, and initialized data all before uninitialized, so
78     we can shorten the on-disk segment size.  */
79  .sdata     : { *(.sdata) }
80  _edata  =  .;
81  PROVIDE (edata = .);
82  . = ALIGN(0x1000);
83  .sbss      :
84  {
85   __bss_start = .;
86   PROVIDE(_bss_start = .);
87   *(.sbss)
88   *(.scommon)
89  }
90  .bss       :
91  {
92   *(.dynbss)
93   *(.bss)
94   *(COMMON)
95  }
96  _end = .;
97  PROVIDE (end = .);
98
99  STABS_DEBUG
100
101  DWARF_DEBUG
102}
103