]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/karo/tx53/u-boot.lds
karo: tx53: prevent boot failure do to bad blocks inside the U-Boot partition
[karo-tx-uboot.git] / board / karo / tx53 / 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                 KEEP(board/karo/tx53/lowlevel_init.o (.text*))
31                 *(.__image_copy_start)
32                 CPUDIR/start.o (.text*)
33                 *(.text*)
34         }
35
36         . = ALIGN(4);
37         .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
38
39         . = ALIGN(4);
40         .data : {
41                 *(.data*)
42         }
43
44         . = ALIGN(4);
45         .u_boot_list : {
46                 KEEP(*(SORT(.u_boot_list*)));
47         }
48
49         . = ALIGN(4);
50         .image_copy_end :
51         {
52                 *(.__image_copy_end)
53         }
54
55         .rel_dyn_start :
56         {
57                 *(.__rel_dyn_start)
58         }
59
60         .rel.dyn :
61         {
62                 *(.rel*)
63         }
64
65         /* Workaround for an apparent bug in i.MX53 ROM Code,
66          * that skips loading the last block if it doesn't
67          * end on a 4KiB boundary.
68          */
69         . = ALIGN(4096);
70         .rel_dyn_end :
71         {
72                 *(.__rel_dyn_end)
73         }
74
75         _end = .;
76
77 /*
78  * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
79  * __bss_base and __bss_limit are for linker only (overlay ordering)
80  */
81
82         .bss_start __rel_dyn_start (OVERLAY) : {
83                 KEEP(*(.__bss_start));
84                 __bss_base = .;
85         }
86
87         .bss __bss_base (OVERLAY) : {
88                 *(.bss*)
89                 . = ALIGN(4);
90                 __bss_limit = .;
91         }
92         .bss_end __bss_limit (OVERLAY) : {
93                 KEEP(*(.__bss_end));
94         }
95  
96         /DISCARD/ : { *(.bss*) }
97         /DISCARD/ : { *(.dynstr*) }
98         /DISCARD/ : { *(.dynsym*) }
99         /DISCARD/ : { *(.dynamic*) }
100         /DISCARD/ : { *(.hash*) }
101         /DISCARD/ : { *(.plt*) }
102         /DISCARD/ : { *(.interp*) }
103         /DISCARD/ : { *(.gnu*) }
104 }