[PATCH] i386 / uml: add dwarf sections to static link script
[pandora-kernel.git] / arch / um / kernel / dyn.lds.S
1 #include <asm-generic/vmlinux.lds.h>
2
3 OUTPUT_FORMAT(ELF_FORMAT)
4 OUTPUT_ARCH(ELF_ARCH)
5 ENTRY(_start)
6 jiffies = jiffies_64;
7
8 SECTIONS
9 {
10   PROVIDE (__executable_start = START);
11   . = START + SIZEOF_HEADERS;
12   .interp         : { *(.interp) }
13   /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
14    * is remapped.*/
15   __binary_start = .;
16   . = ALIGN(4096);              /* Init code and data */
17   _stext = .;
18   __init_begin = .;
19   .init.text : {
20         _sinittext = .;
21         *(.init.text)
22         _einittext = .;
23   }
24
25   . = ALIGN(4096);
26
27   /* Read-only sections, merged into text segment: */
28   .hash           : { *(.hash) }
29   .dynsym         : { *(.dynsym) }
30   .dynstr         : { *(.dynstr) }
31   .gnu.version    : { *(.gnu.version) }
32   .gnu.version_d  : { *(.gnu.version_d) }
33   .gnu.version_r  : { *(.gnu.version_r) }
34   .rel.init       : { *(.rel.init) }
35   .rela.init      : { *(.rela.init) }
36   .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
37   .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
38   .rel.fini       : { *(.rel.fini) }
39   .rela.fini      : { *(.rela.fini) }
40   .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
41   .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
42   .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
43   .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
44   .rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
45   .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
46   .rel.tbss       : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
47   .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
48   .rel.ctors      : { *(.rel.ctors) }
49   .rela.ctors     : { *(.rela.ctors) }
50   .rel.dtors      : { *(.rel.dtors) }
51   .rela.dtors     : { *(.rela.dtors) }
52   .rel.got        : { *(.rel.got) }
53   .rela.got       : { *(.rela.got) }
54   .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
55   .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
56   .rel.plt        : { *(.rel.plt) }
57   .rela.plt       : { *(.rela.plt) }
58   .init           : {
59     KEEP (*(.init))
60   } =0x90909090
61   .plt            : { *(.plt) }
62   .text           : {
63     *(.text)
64     SCHED_TEXT
65     LOCK_TEXT
66     *(.fixup)
67     *(.stub .text.* .gnu.linkonce.t.*)
68     /* .gnu.warning sections are handled specially by elf32.em.  */
69     *(.gnu.warning)
70
71     . = ALIGN(4096);
72     __syscall_stub_start = .;
73     *(.__syscall_stub*)
74     __syscall_stub_end = .;
75     . = ALIGN(4096);
76   } =0x90909090
77   .fini           : {
78     KEEP (*(.fini))
79   } =0x90909090
80
81   .kstrtab : { *(.kstrtab) }
82
83   #include "asm/common.lds.S"
84
85   init.data : { *(.init.data) }
86
87   /* Ensure the __preinit_array_start label is properly aligned.  We
88      could instead move the label definition inside the section, but
89      the linker would then create the section even if it turns out to
90      be empty, which isn't pretty.  */
91   . = ALIGN(32 / 8);
92   .preinit_array     : { *(.preinit_array) }
93   .init_array     : { *(.init_array) }
94   .fini_array     : { *(.fini_array) }
95   .data           : {
96     . = ALIGN(KERNEL_STACK_SIZE);               /* init_task */
97     *(.data.init_task)
98     *(.data .data.* .gnu.linkonce.d.*)
99     SORT(CONSTRUCTORS)
100   }
101   .data1          : { *(.data1) }
102   .tdata          : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
103   .tbss           : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
104   .eh_frame       : { KEEP (*(.eh_frame)) }
105   .gcc_except_table   : { *(.gcc_except_table) }
106   .dynamic        : { *(.dynamic) }
107   .ctors          : {
108     /* gcc uses crtbegin.o to find the start of
109        the constructors, so we make sure it is
110        first.  Because this is a wildcard, it
111        doesn't matter if the user does not
112        actually link against crtbegin.o; the
113        linker won't look for a file to match a
114        wildcard.  The wildcard also means that it
115        doesn't matter which directory crtbegin.o
116        is in.  */
117     KEEP (*crtbegin.o(.ctors))
118     /* We don't want to include the .ctor section from
119        from the crtend.o file until after the sorted ctors.
120        The .ctor section from the crtend file contains the
121        end of ctors marker and it must be last */
122     KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
123     KEEP (*(SORT(.ctors.*)))
124     KEEP (*(.ctors))
125   }
126   .dtors          : {
127     KEEP (*crtbegin.o(.dtors))
128     KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
129     KEEP (*(SORT(.dtors.*)))
130     KEEP (*(.dtors))
131   }
132   .jcr            : { KEEP (*(.jcr)) }
133   .got            : { *(.got.plt) *(.got) }
134   _edata = .;
135   PROVIDE (edata = .);
136   __bss_start = .;
137   .bss            : {
138    *(.dynbss)
139    *(.bss .bss.* .gnu.linkonce.b.*)
140    *(COMMON)
141    /* Align here to ensure that the .bss section occupies space up to
142       _end.  Align after .bss to ensure correct alignment even if the
143       .bss section disappears because there are no input sections.  */
144    . = ALIGN(32 / 8);
145   . = ALIGN(32 / 8);
146   }
147   _end = .;
148   PROVIDE (end = .);
149
150   STABS_DEBUG
151
152   DWARF_DEBUG
153 }