blob: b0d8531a605743cca554a00bfe6ccc762476e8a4 [file] [log] [blame]
Graeme Russc620c012008-12-07 10:28:57 +11001/*
2 * (C) Copyright 2002
Albert ARIBAUDfa82f872011-08-04 18:45:45 +02003 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Graeme Russc620c012008-12-07 10:28:57 +11004 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Graeme Russc620c012008-12-07 10:28:57 +11006 */
7
Graeme Russe4135542011-04-13 19:43:25 +10008#include <config.h>
Graeme Russc620c012008-12-07 10:28:57 +11009OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
10OUTPUT_ARCH(i386)
11ENTRY(_start)
12
13SECTIONS
14{
Wolfgang Denkc8d76ea2010-10-18 23:43:37 +020015 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Graeme Russ067f9b12010-10-07 20:03:31 +110016 __text_start = .;
Graeme Russ22191422010-10-07 20:03:32 +110017 .text : { *(.text*); }
Graeme Russc620c012008-12-07 10:28:57 +110018
19 . = ALIGN(4);
Graeme Russc620c012008-12-07 10:28:57 +110020
Graeme Russ22191422010-10-07 20:03:32 +110021 . = ALIGN(4);
Marek Vasut55675142012-10-12 10:27:03 +000022 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000023 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000024 }
25
26 . = ALIGN(4);
Graeme Russ22191422010-10-07 20:03:32 +110027 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
28
29 . = ALIGN(4);
30 .data : { *(.data*) }
31
32 . = ALIGN(4);
Graeme Russ22191422010-10-07 20:03:32 +110033 .hash : { *(.hash*) }
34
35 . = ALIGN(4);
36 .got : { *(.got*) }
37
38 . = ALIGN(4);
39 __data_end = .;
Simon Glass86cfb6b2013-03-05 14:39:54 +000040 __init_end = .;
Graeme Russc620c012008-12-07 10:28:57 +110041
42 . = ALIGN(4);
Simon Glassf82d15e2013-02-28 19:26:14 +000043 .dynsym : { *(.dynsym*) }
Graeme Russc620c012008-12-07 10:28:57 +110044
Graeme Russ22191422010-10-07 20:03:32 +110045 . = ALIGN(4);
46 __rel_dyn_start = .;
Simon Glass091c4942014-11-14 18:18:24 -070047 .rel.dyn : {
48 *(.rel*)
49 }
Graeme Russ22191422010-10-07 20:03:32 +110050 __rel_dyn_end = .;
Simon Glass4b491b82013-02-28 19:26:13 +000051 . = ALIGN(4);
52 _end = .;
Graeme Russ22191422010-10-07 20:03:32 +110053
Simon Glassf82d15e2013-02-28 19:26:14 +000054 .bss __rel_dyn_start (OVERLAY) : {
55 __bss_start = .;
56 *(.bss)
57 *(COM*)
58 . = ALIGN(4);
59 __bss_end = .;
60 }
61
Graeme Russ22191422010-10-07 20:03:32 +110062 /DISCARD/ : { *(.dynstr*) }
63 /DISCARD/ : { *(.dynamic*) }
64 /DISCARD/ : { *(.plt*) }
65 /DISCARD/ : { *(.interp*) }
66 /DISCARD/ : { *(.gnu*) }
67
Simon Glass588a13f2013-02-14 04:18:54 +000068#ifdef CONFIG_X86_RESET_VECTOR
Graeme Russ3a25e942011-02-12 15:11:24 +110069 /*
70 * The following expressions place the 16-bit Real-Mode code and
71 * Reset Vector at the end of the Flash ROM
Graeme Russc620c012008-12-07 10:28:57 +110072 */
Simon Glassa6a95782014-11-14 18:18:25 -070073 . = START_16 - RESET_SEG_START;
74 .start16 : AT (START_16) {
75 KEEP(*(.start16));
76 }
Graeme Russc620c012008-12-07 10:28:57 +110077
Simon Glassa6a95782014-11-14 18:18:25 -070078 . = RESET_VEC_LOC - RESET_SEG_START;
79 .resetvec : AT (RESET_VEC_LOC) {
80 KEEP(*(.resetvec));
81 }
Gabe Blackb16f5212012-11-27 21:08:06 +000082#endif
Simon Glassa6a95782014-11-14 18:18:25 -070083
Graeme Russc620c012008-12-07 10:28:57 +110084}