]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/karo/tx6/u-boot.lds
karo: tx6: implement secure boot support
[karo-tx-uboot.git] / board / karo / tx6 / u-boot.lds
1 /*
2  * (C) Copyright 2012  Lothar Waßmann <LW@KARO-electronics.de>
3  *
4  * See file CREDITS for list of people who contributed to this
5  * project.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20  * MA 02111-1307 USA
21  */
22 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
23 OUTPUT_ARCH(arm)
24 ENTRY(_start)
25 SECTIONS
26 {
27         . = 0x00000000;
28         .text :
29         {
30                 __uboot_img_start = .;
31                 . = 0x400;
32                 __ivt_start = .;
33                 KEEP(*(.ivt*))
34                 . = 0x1000;
35                 __ivt_end = .;
36                 *(.__image_copy_start)
37                 *(.vectors)
38                 CPUDIR/start.o (.text*)
39                 *(.text*)
40         } = 0xadde01f0
41
42         . = ALIGN(4);
43         .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
44
45         . = ALIGN(4);
46         .data : {
47                 *(.data*)
48                 . = ALIGN(4);
49         }
50
51         .u_boot_list : {
52                 KEEP(*(SORT(.u_boot_list*)));
53         }
54
55         . = ALIGN(4);
56         .image_copy_end :
57         {
58                 *(.__image_copy_end)
59         }
60
61         .rel_dyn_start :
62         {
63                 *(.__rel_dyn_start)
64         }
65
66         .rel.dyn :
67         {
68                 *(.rel*)
69         }
70
71         .rel_dyn_end :
72         {
73                 *(.__rel_dyn_end)
74         }
75
76         .pad :
77         {
78                 *(.pad)
79                 . = ALIGN(4096);
80         } = 0x01f0adde
81
82         _image_binary_end = . + (__ivt_end - __uboot_img_start);
83
84         .uboot_img_end :
85         {
86                 KEEP(*(.__uboot_img_end))
87         }
88
89 #ifdef CONFIG_SECURE_BOOT
90         . = CONFIG_SYS_TEXT_BASE + 0x70000;
91         .csf_data :
92         {
93                 *(.__csf_data)
94                 . = . + 0x2000;
95         }
96 #endif
97         __uboot_img_len = . - __uboot_img_start;
98
99 /*
100  * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
101  * __bss_base and __bss_limit are for linker only (overlay ordering)
102  */
103
104         .bss_start __rel_dyn_start (OVERLAY) : {
105                 KEEP(*(.__bss_start));
106                 __bss_base = .;
107         }
108
109         .bss __bss_base (OVERLAY) : {
110                 *(.bss*)
111                 . = ALIGN(4);
112                 __bss_limit = .;
113         }
114         .bss_end __bss_limit (OVERLAY) : {
115                 KEEP(*(.__bss_end));
116         }
117
118         .dynsym _image_binary_end : { *(.dynsym) }
119         /DISCARD/ : { *(.debug*) }
120         /DISCARD/ : { *(.note*) }
121         /DISCARD/ : { *(.comment*) }
122         /DISCARD/ : { *(.dynbss) }
123         /DISCARD/ : { *(.dynstr*) }
124         /DISCARD/ : { *(.dynamic*) }
125         /DISCARD/ : { *(.plt*) }
126         /DISCARD/ : { *(.interp*) }
127         /DISCARD/ : { *(.gnu.hash) }
128         /DISCARD/ : { *(.gnu*) }
129         /DISCARD/ : { *(.ARM.exidx*) }
130         /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
131 }