blob: 98c7f8e9c53e9d78bea1e193fef10de59e1b85a6 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glassc74f9dc2017-01-16 07:04:01 -07002/*
3 * (C) Copyright 2002
4 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Simon Glassc74f9dc2017-01-16 07:04:01 -07005 */
6
7#include <config.h>
8OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
9OUTPUT_ARCH(i386:x86-64)
10ENTRY(_start)
11
12SECTIONS
13{
14#ifndef CONFIG_CMDLINE
15 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
16#endif
17
18 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
19 __text_start = .;
Alexander Graf94a10f22018-06-12 07:48:37 +020020
21 .text.start : { *(.text.start); }
22
Alexander Graf2133bc52018-07-11 01:39:31 +020023 .__efi_runtime_start : {
24 *(.__efi_runtime_start)
25 }
26
27 .efi_runtime : {
28 *(.text.efi_runtime*)
29 *(.rodata.efi_runtime*)
30 *(.data.efi_runtime*)
31 }
32
33 .__efi_runtime_stop : {
34 *(.__efi_runtime_stop)
35 }
36
Simon Glassc74f9dc2017-01-16 07:04:01 -070037 .text : { *(.text*); }
38
39 . = ALIGN(4);
40
41 . = ALIGN(4);
42 .u_boot_list : {
43 KEEP(*(SORT(.u_boot_list*)));
44 }
45
46 . = ALIGN(4);
Alexander Graf2133bc52018-07-11 01:39:31 +020047 .rodata : {
48 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
49 KEEP(*(.rodata.efi.init));
50 }
Simon Glassc74f9dc2017-01-16 07:04:01 -070051
52 . = ALIGN(4);
53 .data : { *(.data*) }
54
55 . = ALIGN(4);
56 .hash : { *(.hash*) }
57
58 . = ALIGN(4);
59 .got : { *(.got*) }
60
Alexander Graf2133bc52018-07-11 01:39:31 +020061 .efi_runtime_rel_start :
62 {
63 *(.__efi_runtime_rel_start)
64 }
65
66 .efi_runtime_rel : {
67 *(.rel*.efi_runtime)
68 *(.rel*.efi_runtime.*)
69 }
70
71 .efi_runtime_rel_stop :
72 {
73 *(.__efi_runtime_rel_stop)
74 }
75
Simon Glassc74f9dc2017-01-16 07:04:01 -070076 . = ALIGN(4);
77 __data_end = .;
78 __init_end = .;
79
80 . = ALIGN(4);
81 .dynsym : { *(.dynsym*) }
82
83 . = ALIGN(4);
84 __rel_dyn_start = .;
85 .rela.dyn : {
86 *(.rela*)
87 }
88 __rel_dyn_end = .;
89 . = ALIGN(4);
90
91 .dynamic : { *(.dynamic) }
92
93 . = ALIGN(4);
94 _end = .;
95
96 .bss __rel_dyn_start (OVERLAY) : {
97 __bss_start = .;
Alexander Graf61c76782018-08-20 14:17:41 +020098 *(.bss*)
Simon Glassc74f9dc2017-01-16 07:04:01 -070099 *(COM*)
100 . = ALIGN(4);
101 __bss_end = .;
102 }
103
104 /DISCARD/ : { *(.dynsym) }
105 /DISCARD/ : { *(.dynstr*) }
106 /DISCARD/ : { *(.dynamic*) }
107 /DISCARD/ : { *(.plt*) }
108 /DISCARD/ : { *(.interp*) }
109 /DISCARD/ : { *(.gnu*) }
110}