Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 1 | /* |
2 | * Copyright (c) 2004-2008 Texas Instruments | ||||
3 | * | ||||
4 | * (C) Copyright 2002 | ||||
5 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | ||||
6 | * | ||||
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 8 | */ |
9 | |||||
Marc Zyngier | bf433af | 2014-07-12 14:24:02 +0100 | [diff] [blame] | 10 | #include <config.h> |
11 | |||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 12 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
13 | OUTPUT_ARCH(arm) | ||||
14 | ENTRY(_start) | ||||
15 | SECTIONS | ||||
16 | { | ||||
17 | . = 0x00000000; | ||||
18 | |||||
19 | . = ALIGN(4); | ||||
20 | .text : | ||||
21 | { | ||||
Albert ARIBAUD | d026dec | 2013-06-11 14:17:33 +0200 | [diff] [blame] | 22 | *(.__image_copy_start) |
Albert ARIBAUD | 41623c9 | 2014-04-15 16:13:51 +0200 | [diff] [blame] | 23 | *(.vectors) |
Stephen Warren | b68d671 | 2012-10-22 06:19:32 +0000 | [diff] [blame] | 24 | CPUDIR/start.o (.text*) |
25 | *(.text*) | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 26 | } |
27 | |||||
Jan Kiszka | 104d6fb | 2015-04-21 07:18:24 +0200 | [diff] [blame] | 28 | #ifdef CONFIG_ARMV7_NONSEC |
Marc Zyngier | bf433af | 2014-07-12 14:24:02 +0100 | [diff] [blame] | 29 | |
30 | #ifndef CONFIG_ARMV7_SECURE_BASE | ||||
31 | #define CONFIG_ARMV7_SECURE_BASE | ||||
32 | #endif | ||||
33 | |||||
34 | .__secure_start : { | ||||
35 | . = ALIGN(0x1000); | ||||
36 | *(.__secure_start) | ||||
37 | } | ||||
38 | |||||
39 | .secure_text CONFIG_ARMV7_SECURE_BASE : | ||||
40 | AT(ADDR(.__secure_start) + SIZEOF(.__secure_start)) | ||||
41 | { | ||||
42 | *(._secure.text) | ||||
43 | } | ||||
44 | |||||
45 | . = LOADADDR(.__secure_start) + | ||||
46 | SIZEOF(.__secure_start) + | ||||
47 | SIZEOF(.secure_text); | ||||
48 | |||||
49 | __secure_end_lma = .; | ||||
50 | .__secure_end : AT(__secure_end_lma) { | ||||
51 | *(.__secure_end) | ||||
52 | LONG(0x1d1071c); /* Must output something to reset LMA */ | ||||
53 | } | ||||
54 | #endif | ||||
55 | |||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 56 | . = ALIGN(4); |
57 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } | ||||
58 | |||||
59 | . = ALIGN(4); | ||||
60 | .data : { | ||||
Stephen Warren | b68d671 | 2012-10-22 06:19:32 +0000 | [diff] [blame] | 61 | *(.data*) |
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 62 | } |
63 | |||||
64 | . = ALIGN(4); | ||||
65 | |||||
66 | . = .; | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 67 | |
68 | . = ALIGN(4); | ||||
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 69 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 70 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 71 | } |
72 | |||||
73 | . = ALIGN(4); | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 74 | |
Albert ARIBAUD | d026dec | 2013-06-11 14:17:33 +0200 | [diff] [blame] | 75 | .image_copy_end : |
76 | { | ||||
77 | *(.__image_copy_end) | ||||
78 | } | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 79 | |
Albert ARIBAUD | 47bd65e | 2013-06-11 14:17:34 +0200 | [diff] [blame] | 80 | .rel_dyn_start : |
81 | { | ||||
82 | *(.__rel_dyn_start) | ||||
83 | } | ||||
84 | |||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 85 | .rel.dyn : { |
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 86 | *(.rel*) |
Albert ARIBAUD | 47bd65e | 2013-06-11 14:17:34 +0200 | [diff] [blame] | 87 | } |
88 | |||||
89 | .rel_dyn_end : | ||||
90 | { | ||||
91 | *(.__rel_dyn_end) | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 92 | } |
93 | |||||
Albert ARIBAUD | d0b5d9d | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 94 | .end : |
95 | { | ||||
96 | *(.__end) | ||||
97 | } | ||||
98 | |||||
99 | _image_binary_end = .; | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 100 | |
101 | /* | ||||
102 | * Deprecated: this MMU section is used by pxa at present but | ||||
103 | * should not be used by new boards/CPUs. | ||||
104 | */ | ||||
105 | . = ALIGN(4096); | ||||
106 | .mmutable : { | ||||
107 | *(.mmutable) | ||||
108 | } | ||||
109 | |||||
Albert ARIBAUD | f84a7b8 | 2013-04-11 05:43:21 +0000 | [diff] [blame] | 110 | /* |
111 | * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c | ||||
112 | * __bss_base and __bss_limit are for linker only (overlay ordering) | ||||
113 | */ | ||||
114 | |||||
Albert ARIBAUD | 3ebd1cb | 2013-02-25 00:58:59 +0000 | [diff] [blame] | 115 | .bss_start __rel_dyn_start (OVERLAY) : { |
116 | KEEP(*(.__bss_start)); | ||||
Albert ARIBAUD | f84a7b8 | 2013-04-11 05:43:21 +0000 | [diff] [blame] | 117 | __bss_base = .; |
Albert ARIBAUD | 3ebd1cb | 2013-02-25 00:58:59 +0000 | [diff] [blame] | 118 | } |
119 | |||||
Albert ARIBAUD | f84a7b8 | 2013-04-11 05:43:21 +0000 | [diff] [blame] | 120 | .bss __bss_base (OVERLAY) : { |
Stephen Warren | b68d671 | 2012-10-22 06:19:32 +0000 | [diff] [blame] | 121 | *(.bss*) |
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 122 | . = ALIGN(4); |
Albert ARIBAUD | f84a7b8 | 2013-04-11 05:43:21 +0000 | [diff] [blame] | 123 | __bss_limit = .; |
Albert ARIBAUD | 3ebd1cb | 2013-02-25 00:58:59 +0000 | [diff] [blame] | 124 | } |
Tom Rini | 0ce033d | 2013-03-18 12:31:00 -0400 | [diff] [blame] | 125 | |
Albert ARIBAUD | f84a7b8 | 2013-04-11 05:43:21 +0000 | [diff] [blame] | 126 | .bss_end __bss_limit (OVERLAY) : { |
127 | KEEP(*(.__bss_end)); | ||||
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 128 | } |
129 | |||||
Albert ARIBAUD | d0b5d9d | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 130 | .dynsym _image_binary_end : { *(.dynsym) } |
Albert ARIBAUD | 47ed5dd | 2013-11-07 14:21:46 +0100 | [diff] [blame] | 131 | .dynbss : { *(.dynbss) } |
132 | .dynstr : { *(.dynstr*) } | ||||
133 | .dynamic : { *(.dynamic*) } | ||||
134 | .plt : { *(.plt*) } | ||||
135 | .interp : { *(.interp*) } | ||||
Andreas Färber | 2c67e0e | 2014-01-27 05:48:11 +0100 | [diff] [blame] | 136 | .gnu.hash : { *(.gnu.hash) } |
Albert ARIBAUD | 47ed5dd | 2013-11-07 14:21:46 +0100 | [diff] [blame] | 137 | .gnu : { *(.gnu*) } |
138 | .ARM.exidx : { *(.ARM.exidx*) } | ||||
Albert ARIBAUD | b02bfc4 | 2014-01-13 14:57:05 +0100 | [diff] [blame] | 139 | .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) } |
Simon Glass | dde3b70 | 2012-02-23 03:28:41 +0000 | [diff] [blame] | 140 | } |