blob: f48bff54e10347995a2b48b85b648bdda1790ab9 [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 = .;
Graeme Russ078395c2009-11-24 20:04:21 +110047 .rel.dyn : { *(.rel.dyn) }
Graeme Russae428db2010-10-07 20:03:31 +110048 __rel_dyn_end = .;
Simon Glass781db8c2013-02-28 19:26:13 +000049 . = ALIGN(4);
50 _end = .;
Graeme Russe56d3972008-12-07 10:28:57 +110051
Simon Glass18cc2bc2013-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 Russfb4e2be2010-10-07 20:03:32 +110060 /DISCARD/ : { *(.dynstr*) }
61 /DISCARD/ : { *(.dynamic*) }
62 /DISCARD/ : { *(.plt*) }
63 /DISCARD/ : { *(.interp*) }
64 /DISCARD/ : { *(.gnu*) }
Graeme Russe56d3972008-12-07 10:28:57 +110065
Simon Glassbfb59802013-02-14 04:18:54 +000066#ifdef CONFIG_X86_RESET_VECTOR
Gabe Black14f82462012-11-27 21:08:06 +000067
Graeme Russ3fe48602011-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 Russe56d3972008-12-07 10:28:57 +110071 */
Graeme Russ3fe48602011-02-12 15:11:24 +110072 . = START_16;
Graeme Russc5881f12011-04-13 19:43:25 +100073 .start16 : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + START_16)) { KEEP(*(.start16)); }
Graeme Russe56d3972008-12-07 10:28:57 +110074
Graeme Russ3fe48602011-02-12 15:11:24 +110075 . = RESET_VEC_LOC;
Graeme Russc5881f12011-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 Black14f82462012-11-27 21:08:06 +000077#endif
Graeme Russe56d3972008-12-07 10:28:57 +110078}