blob: 36f59ea96db8663b9f44b7dd4a1acfc0a86635f4 [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{
Simon Glassc1352112016-03-13 19:07:29 -060015#ifndef CONFIG_CMDLINE
16 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
17#endif
18
Wolfgang Denkc8d76ea2010-10-18 23:43:37 +020019 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Graeme Russ067f9b12010-10-07 20:03:31 +110020 __text_start = .;
Graeme Russ22191422010-10-07 20:03:32 +110021 .text : { *(.text*); }
Graeme Russc620c012008-12-07 10:28:57 +110022
23 . = ALIGN(4);
Graeme Russc620c012008-12-07 10:28:57 +110024
Graeme Russ22191422010-10-07 20:03:32 +110025 . = ALIGN(4);
Marek Vasut55675142012-10-12 10:27:03 +000026 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000027 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000028 }
29
30 . = ALIGN(4);
Graeme Russ22191422010-10-07 20:03:32 +110031 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
32
33 . = ALIGN(4);
34 .data : { *(.data*) }
35
36 . = ALIGN(4);
Graeme Russ22191422010-10-07 20:03:32 +110037 .hash : { *(.hash*) }
38
39 . = ALIGN(4);
40 .got : { *(.got*) }
41
42 . = ALIGN(4);
43 __data_end = .;
Simon Glass86cfb6b2013-03-05 14:39:54 +000044 __init_end = .;
Graeme Russc620c012008-12-07 10:28:57 +110045
46 . = ALIGN(4);
Simon Glassf82d15e2013-02-28 19:26:14 +000047 .dynsym : { *(.dynsym*) }
Graeme Russc620c012008-12-07 10:28:57 +110048
Graeme Russ22191422010-10-07 20:03:32 +110049 . = ALIGN(4);
50 __rel_dyn_start = .;
Simon Glass091c4942014-11-14 18:18:24 -070051 .rel.dyn : {
52 *(.rel*)
53 }
Graeme Russ22191422010-10-07 20:03:32 +110054 __rel_dyn_end = .;
Simon Glass4b491b82013-02-28 19:26:13 +000055 . = ALIGN(4);
56 _end = .;
Graeme Russ22191422010-10-07 20:03:32 +110057
Simon Glassf82d15e2013-02-28 19:26:14 +000058 .bss __rel_dyn_start (OVERLAY) : {
59 __bss_start = .;
60 *(.bss)
61 *(COM*)
62 . = ALIGN(4);
63 __bss_end = .;
64 }
65
Graeme Russ22191422010-10-07 20:03:32 +110066 /DISCARD/ : { *(.dynstr*) }
67 /DISCARD/ : { *(.dynamic*) }
68 /DISCARD/ : { *(.plt*) }
69 /DISCARD/ : { *(.interp*) }
70 /DISCARD/ : { *(.gnu*) }
71
Simon Glass588a13f2013-02-14 04:18:54 +000072#ifdef CONFIG_X86_RESET_VECTOR
Graeme Russ3a25e942011-02-12 15:11:24 +110073 /*
74 * The following expressions place the 16-bit Real-Mode code and
75 * Reset Vector at the end of the Flash ROM
Graeme Russc620c012008-12-07 10:28:57 +110076 */
Simon Glassa6a95782014-11-14 18:18:25 -070077 . = START_16 - RESET_SEG_START;
78 .start16 : AT (START_16) {
79 KEEP(*(.start16));
80 }
Graeme Russc620c012008-12-07 10:28:57 +110081
Simon Glassa6a95782014-11-14 18:18:25 -070082 . = RESET_VEC_LOC - RESET_SEG_START;
83 .resetvec : AT (RESET_VEC_LOC) {
84 KEEP(*(.resetvec));
85 }
Gabe Blackb16f5212012-11-27 21:08:06 +000086#endif
Simon Glassa6a95782014-11-14 18:18:25 -070087
Graeme Russc620c012008-12-07 10:28:57 +110088}