blob: 36f59ea96db8663b9f44b7dd4a1acfc0a86635f4 [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{
Simon Glass3e2c91c2016-03-13 19:07:29 -060015#ifndef CONFIG_CMDLINE
16 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
17#endif
18
Wolfgang Denkfb2759c2010-10-18 23:43:37 +020019 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Graeme Russae428db2010-10-07 20:03:31 +110020 __text_start = .;
Graeme Russfb4e2be2010-10-07 20:03:32 +110021 .text : { *(.text*); }
Graeme Russe56d3972008-12-07 10:28:57 +110022
23 . = ALIGN(4);
Graeme Russ078395c2009-11-24 20:04:21 +110024
Graeme Russ078395c2009-11-24 20:04:21 +110025 . = ALIGN(4);
Marek Vasut607092a2012-10-12 10:27:03 +000026 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000027 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000028 }
29
30 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110031 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
Graeme Russ078395c2009-11-24 20:04:21 +110032
Graeme Russ078395c2009-11-24 20:04:21 +110033 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110034 .data : { *(.data*) }
Graeme Russe56d3972008-12-07 10:28:57 +110035
Graeme Russ078395c2009-11-24 20:04:21 +110036 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110037 .hash : { *(.hash*) }
Graeme Russe56d3972008-12-07 10:28:57 +110038
39 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110040 .got : { *(.got*) }
Graeme Russe56d3972008-12-07 10:28:57 +110041
42 . = ALIGN(4);
Graeme Russfb4e2be2010-10-07 20:03:32 +110043 __data_end = .;
Simon Glass3e93e332013-03-05 14:39:54 +000044 __init_end = .;
Graeme Russ078395c2009-11-24 20:04:21 +110045
Graeme Russ078395c2009-11-24 20:04:21 +110046 . = ALIGN(4);
Simon Glass18cc2bc2013-02-28 19:26:14 +000047 .dynsym : { *(.dynsym*) }
Graeme Russ078395c2009-11-24 20:04:21 +110048
Graeme Russ078395c2009-11-24 20:04:21 +110049 . = ALIGN(4);
Graeme Russae428db2010-10-07 20:03:31 +110050 __rel_dyn_start = .;
Simon Glass1eb8ebc2014-11-14 18:18:24 -070051 .rel.dyn : {
52 *(.rel*)
53 }
Graeme Russae428db2010-10-07 20:03:31 +110054 __rel_dyn_end = .;
Simon Glass781db8c2013-02-28 19:26:13 +000055 . = ALIGN(4);
56 _end = .;
Graeme Russe56d3972008-12-07 10:28:57 +110057
Simon Glass18cc2bc2013-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 Russfb4e2be2010-10-07 20:03:32 +110066 /DISCARD/ : { *(.dynstr*) }
67 /DISCARD/ : { *(.dynamic*) }
68 /DISCARD/ : { *(.plt*) }
69 /DISCARD/ : { *(.interp*) }
70 /DISCARD/ : { *(.gnu*) }
Graeme Russe56d3972008-12-07 10:28:57 +110071
Simon Glassbfb59802013-02-14 04:18:54 +000072#ifdef CONFIG_X86_RESET_VECTOR
Graeme Russ3fe48602011-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 Russe56d3972008-12-07 10:28:57 +110076 */
Simon Glass20ec2532014-11-14 18:18:25 -070077 . = START_16 - RESET_SEG_START;
78 .start16 : AT (START_16) {
79 KEEP(*(.start16));
80 }
Graeme Russe56d3972008-12-07 10:28:57 +110081
Simon Glass20ec2532014-11-14 18:18:25 -070082 . = RESET_VEC_LOC - RESET_SEG_START;
83 .resetvec : AT (RESET_VEC_LOC) {
84 KEEP(*(.resetvec));
85 }
Gabe Black14f82462012-11-27 21:08:06 +000086#endif
Simon Glass20ec2532014-11-14 18:18:25 -070087
Graeme Russe56d3972008-12-07 10:28:57 +110088}