83e5eb343200024b9d1e70463f1f88de86309288
[coreboot.git] / src / arch / x86 / init / ldscript_failover.lb
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2006 Advanced Micro Devices, Inc.
5  * Copyright (C) 2008-2010 coresystems GmbH
6  *
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
19  */
20
21 /* We use ELF as output format. So that we can debug the code in some form. */
22 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
23 OUTPUT_ARCH(i386)
24
25 MEMORY {
26         rom : ORIGIN = 0xffff0000, LENGTH = 64K
27 }
28
29 TARGET(binary)
30 SECTIONS
31 {
32         /* Align .rom to next 4 byte boundary so no pad byte appears
33          * between _rom and _start.
34          */
35         .bogus ROMLOC_MIN : {
36                 . = ALIGN(4);
37                 ROMLOC = .;
38         } >rom = 0xff
39
40         /* This section might be better named .setup */
41         .rom ROMLOC : {
42                 _rom = .;
43                 *(.rom.text);
44                 *(.rom.data);
45                 *(.rom.data.*);
46                 *(.rodata.*);
47                 _erom = .;
48         } >rom = 0xff
49
50         /* Allocation reserves extra 16 bytes here. Alignment requirements
51          * may cause the total size of a section to change when the start
52          * address gets applied.
53          */
54         ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16);
55
56         /DISCARD/ : {
57                 *(.comment)
58                 *(.note)
59                 *(.comment.*)
60                 *(.note.*)
61                 *(.iplt)
62                 *(.rel.*)
63                 *(.igot.*)
64         }
65 }