blob: f0719368ba652eee4316c239906dffb175c1d4c7 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Graeme Russe56d3972008-12-07 10:28:57 +11002/*
3 * (C) Copyright 2002
Albert ARIBAUD60fbc8d2011-08-04 18:45:45 +02004 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Graeme Russe56d3972008-12-07 10:28:57 +11005 */
6
Graeme Russc5881f12011-04-13 19:43:25 +10007#include <config.h>
Graeme Russe56d3972008-12-07 10:28:57 +11008OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
9OUTPUT_ARCH(i386)
10ENTRY(_start)
11
12SECTIONS
13{
Simon Glass3e2c91c2016-03-13 19:07:29 -060014#ifndef CONFIG_CMDLINE
15 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
16#endif
17
Wolfgang Denkfb2759c2010-10-18 23:43:37 +020018 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Graeme Russae428db2010-10-07 20:03:31 +110019 __text_start = .;
Graeme Russfb4e2be2010-10-07 20:03:32 +110020 .text : { *(.text*); }
Graeme Russe56d3972008-12-07 10:28:57 +110021
22 . = ALIGN(4);
Graeme Russ078395c2009-11-24 20:04:21 +110023
Graeme Russ078395c2009-11-24 20:04:21 +110024 . = ALIGN(4);
Marek Vasut607092a2012-10-12 10:27:03 +000025 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000026 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000027 }
28
29 . = ALIGN(4);
Simon Glasscdfe6962016-09-25 15:27:35 -060030 .rodata : {
31 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
32 KEEP(*(.rodata.efi.init));
33 }
Graeme Russ078395c2009-11-24 20:04:21 +110034
Graeme Russ078395c2009-11-24 20:04:21 +110035 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110036 .data : { *(.data*) }
Graeme Russe56d3972008-12-07 10:28:57 +110037
Graeme Russ078395c2009-11-24 20:04:21 +110038 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110039 .hash : { *(.hash*) }
Graeme Russe56d3972008-12-07 10:28:57 +110040
41 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110042 .got : { *(.got*) }
Graeme Russe56d3972008-12-07 10:28:57 +110043
44 . = ALIGN(4);
Simon Glasscdfe6962016-09-25 15:27:35 -060045
46 .__efi_runtime_start : {
47 *(.__efi_runtime_start)
48 }
49
50 .efi_runtime : {
51 *(efi_runtime_text)
52 *(efi_runtime_data)
53 }
54
55 .__efi_runtime_stop : {
56 *(.__efi_runtime_stop)
57 }
58
59 .efi_runtime_rel_start :
60 {
61 *(.__efi_runtime_rel_start)
62 }
63
64 .efi_runtime_rel : {
65 *(.relefi_runtime_text)
66 *(.relefi_runtime_data)
67 }
68
69 .efi_runtime_rel_stop :
70 {
71 *(.__efi_runtime_rel_stop)
72 }
73
74 . = ALIGN(4);
75
Graeme Russfb4e2be2010-10-07 20:03:32 +110076 __data_end = .;
Simon Glass3e93e332013-03-05 14:39:54 +000077 __init_end = .;
Graeme Russ078395c2009-11-24 20:04:21 +110078
Graeme Russ078395c2009-11-24 20:04:21 +110079 . = ALIGN(4);
Simon Glass18cc2bc2013-02-28 19:26:14 +000080 .dynsym : { *(.dynsym*) }
Graeme Russ078395c2009-11-24 20:04:21 +110081
Graeme Russ078395c2009-11-24 20:04:21 +110082 . = ALIGN(4);
Graeme Russae428db2010-10-07 20:03:31 +110083 __rel_dyn_start = .;
Simon Glass1eb8ebc2014-11-14 18:18:24 -070084 .rel.dyn : {
85 *(.rel*)
86 }
Graeme Russae428db2010-10-07 20:03:31 +110087 __rel_dyn_end = .;
Simon Glass781db8c2013-02-28 19:26:13 +000088 . = ALIGN(4);
89 _end = .;
Graeme Russe56d3972008-12-07 10:28:57 +110090
Simon Glass18cc2bc2013-02-28 19:26:14 +000091 .bss __rel_dyn_start (OVERLAY) : {
92 __bss_start = .;
93 *(.bss)
94 *(COM*)
95 . = ALIGN(4);
96 __bss_end = .;
97 }
98
Graeme Russfb4e2be2010-10-07 20:03:32 +110099 /DISCARD/ : { *(.dynstr*) }
100 /DISCARD/ : { *(.dynamic*) }
101 /DISCARD/ : { *(.plt*) }
102 /DISCARD/ : { *(.interp*) }
103 /DISCARD/ : { *(.gnu*) }
Graeme Russe56d3972008-12-07 10:28:57 +1100104
Simon Glass706f6f52017-01-16 07:03:45 -0700105#ifdef CONFIG_X86_16BIT_INIT
Graeme Russ3fe48602011-02-12 15:11:24 +1100106 /*
107 * The following expressions place the 16-bit Real-Mode code and
108 * Reset Vector at the end of the Flash ROM
Graeme Russe56d3972008-12-07 10:28:57 +1100109 */
Simon Glass20ec2532014-11-14 18:18:25 -0700110 . = START_16 - RESET_SEG_START;
111 .start16 : AT (START_16) {
112 KEEP(*(.start16));
113 }
Graeme Russe56d3972008-12-07 10:28:57 +1100114
Simon Glass20ec2532014-11-14 18:18:25 -0700115 . = RESET_VEC_LOC - RESET_SEG_START;
116 .resetvec : AT (RESET_VEC_LOC) {
117 KEEP(*(.resetvec));
118 }
Gabe Black14f82462012-11-27 21:08:06 +0000119#endif
Simon Glass20ec2532014-11-14 18:18:25 -0700120
Graeme Russe56d3972008-12-07 10:28:57 +1100121}