]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc85xx / u-boot-spl.lds
1 /*
2  * (C) Copyright 2006
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de
4  *
5  * Copyright 2009 Freescale Semiconductor, Inc.
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9
10 #include "config.h"     /* CONFIG_BOARDDIR */
11
12 OUTPUT_ARCH(powerpc)
13 #ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
14 PHDRS
15 {
16         text PT_LOAD;
17         bss PT_LOAD;
18 }
19 #endif
20 SECTIONS
21 {
22         . = CONFIG_SPL_TEXT_BASE;
23         .text : {
24                 *(.text*)
25         }
26         _etext = .;
27
28         .reloc : {
29                 _GOT2_TABLE_ = .;
30                 KEEP(*(.got2))
31                 KEEP(*(.got))
32                 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
33                 _FIXUP_TABLE_ = .;
34                 KEEP(*(.fixup))
35         }
36         __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
37         __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
38
39         . = ALIGN(8);
40         .data : {
41                 *(.rodata*)
42                 *(.data*)
43                 *(.sdata*)
44         }
45         _edata  =  .;
46
47         . = ALIGN(4);
48         .u_boot_list : {
49                 KEEP(*(SORT(.u_boot_list*)));
50         }
51
52         . = .;
53         __start___ex_table = .;
54         __ex_table : { *(__ex_table) }
55         __stop___ex_table = .;
56
57         . = ALIGN(8);
58         __init_begin = .;
59         __init_end = .;
60 /* FIXME for non-NAND SPL */
61 #if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
62         .bootpg ADDR(.text) + 0x1000 :
63         {
64                 arch/powerpc/cpu/mpc85xx/start.o (.bootpg)
65         }
66 #define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */
67 #elif defined(CONFIG_FSL_ELBC)
68 #define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */
69 #else
70 #error unknown NAND controller
71 #endif
72 #ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
73         .bootpg ADDR(.text) - 0x1000 :
74         {
75                 KEEP(*(.bootpg))
76         } :text = 0xffff
77 #else
78         .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
79                 KEEP(*(.resetvec))
80         } = 0xffff
81 #endif
82
83         /*
84          * Make sure that the bss segment isn't linked at 0x0, otherwise its
85          * address won't be updated during relocation fixups.
86          */
87         . |= 0x10;
88
89         . = ALIGN(4);
90         __bss_start = .;
91         .bss : {
92                 *(.sbss*)
93                 *(.bss*)
94         }
95         . = ALIGN(4);
96         __bss_end = .;
97 }