Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 2 | /* |
3 | * (C) Copyright 2002 | ||||
Albert ARIBAUD | 60fbc8d | 2011-08-04 18:45:45 +0200 | [diff] [blame] | 4 | * Daniel Engström, Omicron Ceti AB, daniel@omicron.se. |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 5 | */ |
6 | |||||
Graeme Russ | c5881f1 | 2011-04-13 19:43:25 +1000 | [diff] [blame] | 7 | #include <config.h> |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 8 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
9 | OUTPUT_ARCH(i386) | ||||
10 | ENTRY(_start) | ||||
11 | |||||
12 | SECTIONS | ||||
13 | { | ||||
Simon Glass | 3e2c91c | 2016-03-13 19:07:29 -0600 | [diff] [blame] | 14 | #ifndef CONFIG_CMDLINE |
15 | /DISCARD/ : { *(.u_boot_list_2_cmd_*) } | ||||
16 | #endif | ||||
17 | |||||
Wolfgang Denk | fb2759c | 2010-10-18 23:43:37 +0200 | [diff] [blame] | 18 | . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */ |
Graeme Russ | ae428db | 2010-10-07 20:03:31 +1100 | [diff] [blame] | 19 | __text_start = .; |
Graeme Russ | fb4e2be | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 20 | .text : { *(.text*); } |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 21 | |
22 | . = ALIGN(4); | ||||
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 23 | |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 24 | . = ALIGN(4); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 25 | .u_boot_list : { |
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 26 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 27 | } |
28 | |||||
29 | . = ALIGN(4); | ||||
Simon Glass | cdfe696 | 2016-09-25 15:27:35 -0600 | [diff] [blame] | 30 | .rodata : { |
31 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||
32 | KEEP(*(.rodata.efi.init)); | ||||
33 | } | ||||
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 34 | |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 35 | . = ALIGN(4); |
Graeme Russ | fb4e2be | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 36 | .data : { *(.data*) } |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 37 | |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 38 | . = ALIGN(4); |
Graeme Russ | fb4e2be | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 39 | .hash : { *(.hash*) } |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 40 | |
41 | . = ALIGN(4); | ||||
Graeme Russ | fb4e2be | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 42 | .got : { *(.got*) } |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 43 | |
44 | . = ALIGN(4); | ||||
Simon Glass | cdfe696 | 2016-09-25 15:27:35 -0600 | [diff] [blame] | 45 | |
46 | .__efi_runtime_start : { | ||||
47 | *(.__efi_runtime_start) | ||||
48 | } | ||||
49 | |||||
50 | .efi_runtime : { | ||||
51 | *(efi_runtime_text) | ||||
52 | *(efi_runtime_data) | ||||
53 | } | ||||
54 | |||||
55 | .__efi_runtime_stop : { | ||||
56 | *(.__efi_runtime_stop) | ||||
57 | } | ||||
58 | |||||
59 | .efi_runtime_rel_start : | ||||
60 | { | ||||
61 | *(.__efi_runtime_rel_start) | ||||
62 | } | ||||
63 | |||||
64 | .efi_runtime_rel : { | ||||
65 | *(.relefi_runtime_text) | ||||
66 | *(.relefi_runtime_data) | ||||
67 | } | ||||
68 | |||||
69 | .efi_runtime_rel_stop : | ||||
70 | { | ||||
71 | *(.__efi_runtime_rel_stop) | ||||
72 | } | ||||
73 | |||||
74 | . = ALIGN(4); | ||||
75 | |||||
Graeme Russ | fb4e2be | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 76 | __data_end = .; |
Simon Glass | 3e93e33 | 2013-03-05 14:39:54 +0000 | [diff] [blame] | 77 | __init_end = .; |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 78 | |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 79 | . = ALIGN(4); |
Simon Glass | 18cc2bc | 2013-02-28 19:26:14 +0000 | [diff] [blame] | 80 | .dynsym : { *(.dynsym*) } |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 81 | |
Graeme Russ | 078395c | 2009-11-24 20:04:21 +1100 | [diff] [blame] | 82 | . = ALIGN(4); |
Graeme Russ | ae428db | 2010-10-07 20:03:31 +1100 | [diff] [blame] | 83 | __rel_dyn_start = .; |
Simon Glass | 1eb8ebc | 2014-11-14 18:18:24 -0700 | [diff] [blame] | 84 | .rel.dyn : { |
85 | *(.rel*) | ||||
86 | } | ||||
Graeme Russ | ae428db | 2010-10-07 20:03:31 +1100 | [diff] [blame] | 87 | __rel_dyn_end = .; |
Simon Glass | 781db8c | 2013-02-28 19:26:13 +0000 | [diff] [blame] | 88 | . = ALIGN(4); |
89 | _end = .; | ||||
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 90 | |
Simon Glass | 18cc2bc | 2013-02-28 19:26:14 +0000 | [diff] [blame] | 91 | .bss __rel_dyn_start (OVERLAY) : { |
92 | __bss_start = .; | ||||
93 | *(.bss) | ||||
94 | *(COM*) | ||||
95 | . = ALIGN(4); | ||||
96 | __bss_end = .; | ||||
97 | } | ||||
98 | |||||
Graeme Russ | fb4e2be | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 99 | /DISCARD/ : { *(.dynstr*) } |
100 | /DISCARD/ : { *(.dynamic*) } | ||||
101 | /DISCARD/ : { *(.plt*) } | ||||
102 | /DISCARD/ : { *(.interp*) } | ||||
103 | /DISCARD/ : { *(.gnu*) } | ||||
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 104 | |
Simon Glass | 706f6f5 | 2017-01-16 07:03:45 -0700 | [diff] [blame] | 105 | #ifdef CONFIG_X86_16BIT_INIT |
Graeme Russ | 3fe4860 | 2011-02-12 15:11:24 +1100 | [diff] [blame] | 106 | /* |
107 | * The following expressions place the 16-bit Real-Mode code and | ||||
108 | * Reset Vector at the end of the Flash ROM | ||||
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 109 | */ |
Simon Glass | 20ec253 | 2014-11-14 18:18:25 -0700 | [diff] [blame] | 110 | . = START_16 - RESET_SEG_START; |
111 | .start16 : AT (START_16) { | ||||
112 | KEEP(*(.start16)); | ||||
113 | } | ||||
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 114 | |
Simon Glass | 20ec253 | 2014-11-14 18:18:25 -0700 | [diff] [blame] | 115 | . = RESET_VEC_LOC - RESET_SEG_START; |
116 | .resetvec : AT (RESET_VEC_LOC) { | ||||
117 | KEEP(*(.resetvec)); | ||||
118 | } | ||||
Gabe Black | 14f8246 | 2012-11-27 21:08:06 +0000 | [diff] [blame] | 119 | #endif |
Simon Glass | 20ec253 | 2014-11-14 18:18:25 -0700 | [diff] [blame] | 120 | |
Graeme Russ | e56d397 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 121 | } |