Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-51
[coreboot.git] / src / arch / i386 / init / ldscript.lb
1 /*
2  *      Memory map:
3  *
4  *      _RAMBASE                
5  *                              : data segment
6  *                              : bss segment
7  *                              : heap
8  *                              : stack
9  *      _ROMBASE
10  *                              : linuxbios text 
11  *                              : readonly text
12  */
13 /*
14  * Bootstrap code for the STPC Consumer
15  * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
16  *
17  */
18
19 /*
20  *      Written by Johan Rydberg, based on work by Daniel Kahlin.
21  *      Rewritten by Eric Biederman
22  */
23 /*
24  *      We use ELF as output format. So that we can
25  *      debug the code in some form. 
26  */
27 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
28 OUTPUT_ARCH(i386)
29
30 ENTRY(_start)
31
32 TARGET(binary)
33 INPUT(linuxbios_ram.rom)
34 SECTIONS
35 {
36         . = _ROMBASE;
37         
38         .ram . : {
39                 _ram = . ;
40                 linuxbios_ram.rom(*)
41                 _eram = . ;
42         }
43
44         /* This section might be better named .setup */
45         .rom . : {
46                 _rom = .;
47                 *(.rom.text);
48                 *(.rom.data);
49                 *(.rom.data.*);
50                 . = ALIGN(16);
51                 _erom = .;
52         }
53
54         _lrom = LOADADDR(.rom);
55         _elrom = LOADADDR(.rom) + SIZEOF(.rom);
56         _iseg = _RAMBASE;
57         _eiseg = _iseg + SIZEOF(.ram);
58         _liseg = _ram;
59         _eliseg = _eram;
60
61         /DISCARD/ : {
62                 *(.comment)
63                 *(.note)
64         }
65 }