blob: 124a361fc0e8f6b3ef4b1269412b37731a759c28 [file] [log] [blame]
Graeme Russe56d3972008-12-07 10:28:57 +11001/*
2 * (C) Copyright 2002
Albert ARIBAUD60fbc8d2011-08-04 18:45:45 +02003 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Graeme Russe56d3972008-12-07 10:28:57 +11004 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Graeme Russe56d3972008-12-07 10:28:57 +11006 */
7
Graeme Russc5881f12011-04-13 19:43:25 +10008#include <config.h>
Graeme Russe56d3972008-12-07 10:28:57 +11009OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
10OUTPUT_ARCH(i386)
11ENTRY(_start)
12
13SECTIONS
14{
Wolfgang Denkfb2759c2010-10-18 23:43:37 +020015 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Graeme Russae428db2010-10-07 20:03:31 +110016 __text_start = .;
Graeme Russfb4e2be2010-10-07 20:03:32 +110017 .text : { *(.text*); }
Graeme Russe56d3972008-12-07 10:28:57 +110018
19 . = ALIGN(4);
Graeme Russ078395c2009-11-24 20:04:21 +110020
Graeme Russ078395c2009-11-24 20:04:21 +110021 . = ALIGN(4);
Marek Vasut607092a2012-10-12 10:27:03 +000022 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000023 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000024 }
25
26 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110027 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
Graeme Russ078395c2009-11-24 20:04:21 +110028
Graeme Russ078395c2009-11-24 20:04:21 +110029 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110030 .data : { *(.data*) }
Graeme Russe56d3972008-12-07 10:28:57 +110031
Graeme Russ078395c2009-11-24 20:04:21 +110032 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110033 .hash : { *(.hash*) }
Graeme Russe56d3972008-12-07 10:28:57 +110034
35 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110036 .got : { *(.got*) }
Graeme Russe56d3972008-12-07 10:28:57 +110037
38 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110039 __data_end = .;
Simon Glass3e93e332013-03-05 14:39:54 +000040 __init_end = .;
Graeme Russ078395c2009-11-24 20:04:21 +110041
Graeme Russ078395c2009-11-24 20:04:21 +110042 . = ALIGN(4);
Simon Glass18cc2bc2013-02-28 19:26:14 +000043 .dynsym : { *(.dynsym*) }
Graeme Russ078395c2009-11-24 20:04:21 +110044
Graeme Russ078395c2009-11-24 20:04:21 +110045 . = ALIGN(4);
Graeme Russae428db2010-10-07 20:03:31 +110046 __rel_dyn_start = .;
Simon Glass1eb8ebc2014-11-14 18:18:24 -070047 .rel.dyn : {
48 *(.rel*)
49 }
Graeme Russae428db2010-10-07 20:03:31 +110050 __rel_dyn_end = .;
Simon Glass781db8c2013-02-28 19:26:13 +000051 . = ALIGN(4);
52 _end = .;
Graeme Russe56d3972008-12-07 10:28:57 +110053
Simon Glass18cc2bc2013-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 Russfb4e2be2010-10-07 20:03:32 +110062 /DISCARD/ : { *(.dynstr*) }
63 /DISCARD/ : { *(.dynamic*) }
64 /DISCARD/ : { *(.plt*) }
65 /DISCARD/ : { *(.interp*) }
66 /DISCARD/ : { *(.gnu*) }
Graeme Russe56d3972008-12-07 10:28:57 +110067
Simon Glassbfb59802013-02-14 04:18:54 +000068#ifdef CONFIG_X86_RESET_VECTOR
Gabe Black14f82462012-11-27 21:08:06 +000069
Graeme Russ3fe48602011-02-12 15:11:24 +110070 /*
71 * The following expressions place the 16-bit Real-Mode code and
72 * Reset Vector at the end of the Flash ROM
Graeme Russe56d3972008-12-07 10:28:57 +110073 */
Graeme Russ3fe48602011-02-12 15:11:24 +110074 . = START_16;
Graeme Russc5881f12011-04-13 19:43:25 +100075 .start16 : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + START_16)) { KEEP(*(.start16)); }
Graeme Russe56d3972008-12-07 10:28:57 +110076
Graeme Russ3fe48602011-02-12 15:11:24 +110077 . = RESET_VEC_LOC;
Graeme Russc5881f12011-04-13 19:43:25 +100078 .resetvec : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + RESET_VEC_LOC)) { KEEP(*(.resetvec)); }
Gabe Black14f82462012-11-27 21:08:06 +000079#endif
Graeme Russe56d3972008-12-07 10:28:57 +110080}