microblaze: Generate correct signal and siginfo for integer div-by-zero
[safe/jmp/linux-2.6] / arch / microblaze / kernel / vmlinux.lds.S
1 /*
2  * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
3  * Copyright (C) 2008-2009 PetaLogix
4  * Copyright (C) 2006 Atmark Techno, Inc.
5  *
6  * This file is subject to the terms and conditions of the GNU General Public
7  * License. See the file "COPYING" in the main directory of this archive
8  * for more details.
9  */
10
11 OUTPUT_FORMAT("elf32-microblaze", "elf32-microblaze", "elf32-microblaze")
12 OUTPUT_ARCH(microblaze)
13 ENTRY(_start)
14
15 #include <asm-generic/vmlinux.lds.h>
16 #include <asm/page.h>
17 #include <asm/thread_info.h>
18
19 jiffies = jiffies_64 + 4;
20
21 SECTIONS {
22         . = CONFIG_KERNEL_START;
23         .text : {
24                 _text = . ;
25                 _stext = . ;
26                 *(.text .text.*)
27                 *(.fixup)
28                EXIT_TEXT
29                EXIT_CALL
30                 SCHED_TEXT
31                 LOCK_TEXT
32                 KPROBES_TEXT
33                 . = ALIGN (4) ;
34                 _etext = . ;
35         }
36
37         . = ALIGN (4) ;
38         _fdt_start = . ; /* place for fdt blob */
39         . = . + 0x4000;
40         _fdt_end = . ;
41
42         . = ALIGN(16);
43         RODATA
44         EXCEPTION_TABLE(16)
45
46         /*
47          * sdata2 section can go anywhere, but must be word aligned
48          * and SDA2_BASE must point to the middle of it
49          */
50         .sdata2 : {
51                 _ssrw = .;
52                 . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */
53                 *(.sdata2)
54         . = ALIGN(8);
55         _essrw = .;
56         _ssrw_size = _essrw - _ssrw;
57         _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2);
58         }
59
60         _sdata = . ;
61         RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
62         _edata = . ;
63
64         /* Reserve some low RAM for r0 based memory references */
65         . = ALIGN(0x4) ;
66         r0_ram = . ;
67         . = . +  4096;  /* a page should be enough */
68
69         /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
70         . = ALIGN(8);
71         .sdata : {
72                 _ssro = .;
73                 *(.sdata)
74         }
75
76         .sbss : {
77                 _ssbss = .;
78                 *(.sbss)
79                 _esbss = .;
80                 _essro = .;
81                 _ssro_size = _essro - _ssro ;
82                 _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
83         }
84
85         __init_begin = .;
86
87         INIT_TEXT_SECTION(PAGE_SIZE)
88
89         .init.data : {
90                 INIT_DATA
91         }
92
93         . = ALIGN(4);
94         .init.ivt : {
95                 __ivt_start = .;
96                 *(.init.ivt)
97                 __ivt_end = .;
98         }
99
100         .init.setup : {
101                 INIT_SETUP(0)
102         }
103
104         .initcall.init : {
105                 INIT_CALLS
106         }
107
108         .con_initcall.init : {
109                 CON_INITCALL
110         }
111
112         SECURITY_INIT
113
114         __init_end_before_initramfs = .;
115
116         .init.ramfs ALIGN(4096) : {
117                 __initramfs_start = .;
118                 *(.init.ramfs)
119                 __initramfs_end = .;
120                 . = ALIGN(4);
121                 LONG(0);
122 /*
123  * FIXME this can break initramfs for MMU.
124  * Pad init.ramfs up to page boundary,
125  * so that __init_end == __bss_start. This will make image.elf
126  * consistent with the image.bin
127  */
128                 /* . = ALIGN(4096); */
129         }
130         __init_end = .;
131
132         .bss ALIGN (4096) : { /* page aligned when MMU used */
133                 __bss_start = . ;
134                         *(.bss*)
135                         *(COMMON)
136                 . = ALIGN (4) ;
137                 __bss_stop = . ;
138                 _ebss = . ;
139         }
140         . = ALIGN(4096);
141         _end = .;
142
143         DISCARDS
144 }