Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 1 | /* |
Stefan Reinauer | 7925384 | 2010-04-13 13:43:35 +0000 | [diff] [blame^] | 2 | * This file is part of the coreboot project. |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 3 | * |
Stefan Reinauer | 7925384 | 2010-04-13 13:43:35 +0000 | [diff] [blame^] | 4 | * Copyright (C) 2006 Advanced Micro Devices, Inc. |
| 5 | * Copyright (C) 2008-2010 coresystems GmbH |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 6 | * |
Stefan Reinauer | 7925384 | 2010-04-13 13:43:35 +0000 | [diff] [blame^] | 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
Stefan Reinauer | 7925384 | 2010-04-13 13:43:35 +0000 | [diff] [blame^] | 21 | /* We use ELF as output format. So that we can debug the code in some form. */ |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 22 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
| 23 | OUTPUT_ARCH(i386) |
| 24 | |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame] | 25 | MEMORY { |
| 26 | rom : ORIGIN = 0xffff0000, LENGTH = 64K |
| 27 | } |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 28 | |
| 29 | TARGET(binary) |
| 30 | SECTIONS |
| 31 | { |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 32 | /* This section might be better named .setup */ |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame] | 33 | .rom ROMLOC : { |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 34 | _rom = .; |
| 35 | *(.rom.text); |
| 36 | *(.rom.data); |
| 37 | *(.rom.data.*); |
| 38 | *(.rodata.*); |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 39 | _erom = .; |
Stefan Reinauer | 7925384 | 2010-04-13 13:43:35 +0000 | [diff] [blame^] | 40 | } >rom = 0xff |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 41 | |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame] | 42 | ROMLOC = 0xffffff00 - (_erom - _rom) + 1; |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 43 | |
| 44 | /DISCARD/ : { |
| 45 | *(.comment) |
| 46 | *(.note) |
| 47 | *(.comment.*) |
| 48 | *(.note.*) |
Patrick Georgi | 1c1d9a0 | 2010-02-23 19:38:44 +0000 | [diff] [blame] | 49 | *(.iplt) |
| 50 | *(.rel.*) |
| 51 | *(.igot.*) |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 52 | } |
| 53 | } |