Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 1 | /* |
2 | * (C) Copyright 2002 | ||||
Albert ARIBAUD | fa82f87 | 2011-08-04 18:45:45 +0200 | [diff] [blame] | 3 | * Daniel Engström, Omicron Ceti AB, daniel@omicron.se. |
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 6 | */ |
7 | |||||
Graeme Russ | e413554 | 2011-04-13 19:43:25 +1000 | [diff] [blame] | 8 | #include <config.h> |
Graeme Russ | c620c01 | 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 | c135211 | 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 | c8d76ea | 2010-10-18 23:43:37 +0200 | [diff] [blame] | 19 | . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */ |
Graeme Russ | 067f9b1 | 2010-10-07 20:03:31 +1100 | [diff] [blame] | 20 | __text_start = .; |
Graeme Russ | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 21 | .text : { *(.text*); } |
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 22 | |
23 | . = ALIGN(4); | ||||
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 24 | |
Graeme Russ | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 25 | . = ALIGN(4); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 26 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 27 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 28 | } |
29 | |||||
30 | . = ALIGN(4); | ||||
Simon Glass | 65e4c0b | 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 | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 35 | |
36 | . = ALIGN(4); | ||||
37 | .data : { *(.data*) } | ||||
38 | |||||
39 | . = ALIGN(4); | ||||
Graeme Russ | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 40 | .hash : { *(.hash*) } |
41 | |||||
42 | . = ALIGN(4); | ||||
43 | .got : { *(.got*) } | ||||
44 | |||||
45 | . = ALIGN(4); | ||||
Simon Glass | 65e4c0b | 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 | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 77 | __data_end = .; |
Simon Glass | 86cfb6b | 2013-03-05 14:39:54 +0000 | [diff] [blame] | 78 | __init_end = .; |
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 79 | |
80 | . = ALIGN(4); | ||||
Simon Glass | f82d15e | 2013-02-28 19:26:14 +0000 | [diff] [blame] | 81 | .dynsym : { *(.dynsym*) } |
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 82 | |
Graeme Russ | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 83 | . = ALIGN(4); |
84 | __rel_dyn_start = .; | ||||
Simon Glass | 091c494 | 2014-11-14 18:18:24 -0700 | [diff] [blame] | 85 | .rel.dyn : { |
86 | *(.rel*) | ||||
87 | } | ||||
Graeme Russ | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 88 | __rel_dyn_end = .; |
Simon Glass | 4b491b8 | 2013-02-28 19:26:13 +0000 | [diff] [blame] | 89 | . = ALIGN(4); |
90 | _end = .; | ||||
Graeme Russ | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 91 | |
Simon Glass | f82d15e | 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 | 2219142 | 2010-10-07 20:03:32 +1100 | [diff] [blame] | 100 | /DISCARD/ : { *(.dynstr*) } |
101 | /DISCARD/ : { *(.dynamic*) } | ||||
102 | /DISCARD/ : { *(.plt*) } | ||||
103 | /DISCARD/ : { *(.interp*) } | ||||
104 | /DISCARD/ : { *(.gnu*) } | ||||
105 | |||||
Simon Glass | 972188b | 2017-01-16 07:03:45 -0700 | [diff] [blame] | 106 | #ifdef CONFIG_X86_16BIT_INIT |
Graeme Russ | 3a25e94 | 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 | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 110 | */ |
Simon Glass | a6a9578 | 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 | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 115 | |
Simon Glass | a6a9578 | 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 | b16f521 | 2012-11-27 21:08:06 +0000 | [diff] [blame] | 120 | #endif |
Simon Glass | a6a9578 | 2014-11-14 18:18:25 -0700 | [diff] [blame] | 121 | |
Graeme Russ | c620c01 | 2008-12-07 10:28:57 +1100 | [diff] [blame] | 122 | } |