c9027826819136a5da6476ce9436e970a71f4e70
[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 /*
31 ENTRY(_start)
32 */
33
34 TARGET(binary)
35 INPUT(linuxbios_ram.rom)
36 SECTIONS
37 {
38         . = _ROMBASE;
39
40         .ram . : {
41                 _ram = . ;
42                 linuxbios_ram.rom(*)
43                 _eram = . ;
44         }
45
46         /* This section might be better named .setup */
47         .rom . : {
48                 _rom = .;
49                 *(.rom.text);
50                 *(.rom.data);
51                 *(.rom.data.*);
52                 . = ALIGN(16);
53                 _erom = .;
54         }
55
56         _lrom = LOADADDR(.rom);
57         _elrom = LOADADDR(.rom) + SIZEOF(.rom);
58         _iseg = _RAMBASE;
59         _eiseg = _iseg + SIZEOF(.ram);
60         _liseg = _ram;
61         _eliseg = _eram;
62
63         /DISCARD/ : {
64                 *(.comment)
65                 *(.note)
66         }
67 }