blob: c1e9bfbf66f726d7e5a6734c379e9374b5902e73 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass9e8dd4f2017-01-16 07:04:02 -07002/*
3 * (C) Copyright 2002
4 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Simon Glass9e8dd4f2017-01-16 07:04:02 -07005 */
6
7#include <config.h>
8OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
9OUTPUT_ARCH(i386)
10ENTRY(_start)
11
12SECTIONS
13{
14#ifndef CONFIG_CMDLINE
15 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
16#endif
17
Tom Rini2aaa27d2019-01-22 17:09:26 -050018 . = IMAGE_TEXT_BASE; /* Location of bootcode in flash */
Simon Glass9e8dd4f2017-01-16 07:04:02 -070019 __text_start = .;
20 .text : { *(.text*); }
21
22 . = ALIGN(4);
23
24 . = ALIGN(4);
25 .u_boot_list : {
26 KEEP(*(SORT(.u_boot_list*)));
27 }
28
29 . = ALIGN(4);
30 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
31
32 . = ALIGN(4);
33 .data : { *(.data*) }
34
35 . = ALIGN(4);
36 __data_end = .;
37 __init_end = .;
Simon Glass5a4e0182019-09-25 08:11:36 -060038 . = ALIGN(4);
39 .binman_sym_table : {
40 __binman_sym_start = .;
41 KEEP(*(SORT(.binman_sym*)));
42 __binman_sym_end = .;
43 }
Simon Glass9e8dd4f2017-01-16 07:04:02 -070044
45 _image_binary_end = .;
46
47 . = 0x120000;
48 .bss (OVERLAY) : {
49 __bss_start = .;
50 *(.bss*)
51 *(COM*)
52 . = ALIGN(4);
53 __bss_end = .;
54 }
55 __bss_size = __bss_end - __bss_start;
56
57 /DISCARD/ : { *(.dynstr*) }
58 /DISCARD/ : { *(.dynamic*) }
59 /DISCARD/ : { *(.plt*) }
60 /DISCARD/ : { *(.interp*) }
61 /DISCARD/ : { *(.gnu*) }
62
Simon Glass79ef6992019-04-25 21:58:53 -060063#if defined(CONFIG_SPL_X86_16BIT_INIT) || defined(CONFIG_TPL_X86_16BIT_INIT)
Simon Glass9e8dd4f2017-01-16 07:04:02 -070064 /*
65 * The following expressions place the 16-bit Real-Mode code and
66 * Reset Vector at the end of the Flash ROM
67 */
68 . = START_16 - RESET_SEG_START;
69 .start16 : AT (START_16) {
70 KEEP(*(.start16));
71 }
72
73 . = RESET_VEC_LOC - RESET_SEG_START;
74 .resetvec : AT (RESET_VEC_LOC) {
75 KEEP(*(.resetvec));
76 }
77#endif
78
79}