port-work; won't compile or even work
[ppcskel.git] / mini.ld
1 /*
2         BootMii - a Free Software replacement for the Nintendo/BroadOn bootloader.
3         Requires mini.
4
5 Copyright (C) 2009                      Andre Heider "dhewg" <dhewg@wiibrew.org>
6
7 # This code is licensed to you under the terms of the GNU GPL, version 2;
8 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 */
10
11 OUTPUT_FORMAT("elf32-powerpc")
12 OUTPUT_ARCH(powerpc:common)
13
14 ENTRY(_realmode_vector)
15
16 PHDRS {
17         realmode        PT_LOAD FLAGS(5);
18         app                     PT_LOAD FLAGS(7);
19 }
20
21 SECTIONS {
22         . = 0x00003400;
23
24         .realmode : { *(.realmode) } :realmode = 0
25
26         . = 0x80004000;
27
28         .start : AT(ADDR(.start) & 0x3fffffff) { crt0.o(*) } :app = 0
29
30         .text : { *(.text) *(.text.*) . = ALIGN(32); }
31
32         .data : { *(.data) *(.data.*) . = ALIGN(32); }
33         .sdata : { *(.sdata) *(.sdata.*) . = ALIGN(32); }
34         .rodata : { *(.rodata) *(.rodata.*) . = ALIGN(32); }
35         .stack : {
36                 _stack_top = .;
37                 . += 32768;
38                 _stack_bot = .;
39         }
40
41         . = ALIGN(32);
42
43         __bss_start = .;
44         .bss : { *(.bss) }
45         .sbss : { *(.sbss) }
46         __bss_end = .;
47
48         . = ALIGN(0x10000);
49
50         _sbrk_start = .;
51         _sbrk_end = 0x816ffff0;
52 }
53