xref: /openbmc/u-boot/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds (revision 556751427b9b79266918e87f7399e1a6eea60096)
1/*
2 * Copyright 2009-2012 Freescale Semiconductor, Inc.
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
23OUTPUT_ARCH(powerpc)
24/* Do we need any of these for elf?
25   __DYNAMIC = 0;    */
26PHDRS
27{
28  text PT_LOAD;
29  bss PT_LOAD;
30}
31
32SECTIONS
33{
34  /* Read-only sections, merged into text segment: */
35  . = + SIZEOF_HEADERS;
36  .interp : { *(.interp) }
37  .text      :
38  {
39    *(.text*)
40   } :text
41    _etext = .;
42    PROVIDE (etext = .);
43    .rodata    :
44   {
45    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
46  } :text
47
48  /* Read-write section, merged into data segment: */
49  . = (. + 0x00FF) & 0xFFFFFF00;
50  _erotext = .;
51  PROVIDE (erotext = .);
52  .reloc   :
53  {
54    _GOT2_TABLE_ = .;
55    KEEP(*(.got2))
56    KEEP(*(.got))
57    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
58    _FIXUP_TABLE_ = .;
59    KEEP(*(.fixup))
60  }
61  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
62  __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
63
64  .data    :
65  {
66    *(.data*)
67    *(.sdata*)
68  }
69  _edata  =  .;
70  PROVIDE (edata = .);
71
72  . = .;
73  __u_boot_cmd_start = .;
74  .u_boot_cmd : { *(.u_boot_cmd) }
75  __u_boot_cmd_end = .;
76
77  .u_boot_list : {
78	#include <u-boot.lst>
79  }
80
81  . = .;
82  __start___ex_table = .;
83  __ex_table : { *(__ex_table) }
84  __stop___ex_table = .;
85
86  . = ALIGN(256);
87  __init_begin = .;
88  .text.init : { *(.text.init) }
89  .data.init : { *(.data.init) }
90  . = ALIGN(256);
91  __init_end = .;
92
93  .bootpg ADDR(.text) - 0x1000 :
94  {
95    KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
96  } :text = 0xffff
97
98  . = ADDR(.text) + 0x80000;
99
100  __bss_start = .;
101  .bss (NOLOAD)       :
102  {
103   *(.sbss*)
104   *(.bss*)
105   *(COMMON)
106  } :bss
107
108  . = ALIGN(4);
109  __bss_end__ = . ;
110  PROVIDE (end = .);
111}
112