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