blob: f48bff54e10347995a2b48b85b648bdda1790ab9 [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 = .;
47 .rel.dyn : { *(.rel.dyn) }
48 __rel_dyn_end = .;
Simon Glass4b491b82013-02-28 19:26:13 +000049 . = ALIGN(4);
50 _end = .;
Graeme Russ22191422010-10-07 20:03:32 +110051
Simon Glassf82d15e2013-02-28 19:26:14 +000052 .bss __rel_dyn_start (OVERLAY) : {
53 __bss_start = .;
54 *(.bss)
55 *(COM*)
56 . = ALIGN(4);
57 __bss_end = .;
58 }
59
Graeme Russ22191422010-10-07 20:03:32 +110060 /DISCARD/ : { *(.dynstr*) }
61 /DISCARD/ : { *(.dynamic*) }
62 /DISCARD/ : { *(.plt*) }
63 /DISCARD/ : { *(.interp*) }
64 /DISCARD/ : { *(.gnu*) }
65
Simon Glass588a13f2013-02-14 04:18:54 +000066#ifdef CONFIG_X86_RESET_VECTOR
Gabe Blackb16f5212012-11-27 21:08:06 +000067
Graeme Russ3a25e942011-02-12 15:11:24 +110068 /*
69 * The following expressions place the 16-bit Real-Mode code and
70 * Reset Vector at the end of the Flash ROM
Graeme Russc620c012008-12-07 10:28:57 +110071 */
Graeme Russ3a25e942011-02-12 15:11:24 +110072 . = START_16;
Graeme Russe4135542011-04-13 19:43:25 +100073 .start16 : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + START_16)) { KEEP(*(.start16)); }
Graeme Russc620c012008-12-07 10:28:57 +110074
Graeme Russ3a25e942011-02-12 15:11:24 +110075 . = RESET_VEC_LOC;
Graeme Russe4135542011-04-13 19:43:25 +100076 .resetvec : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + RESET_VEC_LOC)) { KEEP(*(.resetvec)); }
Gabe Blackb16f5212012-11-27 21:08:06 +000077#endif
Graeme Russc620c012008-12-07 10:28:57 +110078}