Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Memory map: |
| 3 | * |
| 4 | * CONFIG_RAMBASE |
| 5 | * : data segment |
| 6 | * : bss segment |
| 7 | * : heap |
| 8 | * : stack |
| 9 | * CONFIG_ROMBASE |
| 10 | * : coreboot 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 | |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame^] | 30 | MEMORY { |
| 31 | rom : ORIGIN = 0xffff0000, LENGTH = 64K |
| 32 | } |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 33 | |
| 34 | TARGET(binary) |
| 35 | SECTIONS |
| 36 | { |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame^] | 37 | . = 0; |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 38 | |
| 39 | /* This section might be better named .setup */ |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame^] | 40 | .rom ROMLOC : { |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 41 | _rom = .; |
| 42 | *(.rom.text); |
| 43 | *(.rom.data); |
| 44 | *(.rom.data.*); |
| 45 | *(.rodata.*); |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 46 | _erom = .; |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame^] | 47 | } >rom =0xff |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 48 | |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame^] | 49 | ROMLOC = 0xffffff00 - (_erom - _rom) + 1; |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 50 | |
| 51 | /DISCARD/ : { |
| 52 | *(.comment) |
| 53 | *(.note) |
| 54 | *(.comment.*) |
| 55 | *(.note.*) |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame^] | 56 | *(.iplt) |
| 57 | *(.rel.*) |
| 58 | *(.igot.*) |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 59 | } |
| 60 | } |