1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2009-2012 Freescale Semiconductor, Inc.
4 */
5
6#include "config.h"
7
8#ifndef CONFIG_SYS_MONITOR_LEN
9#define CONFIG_SYS_MONITOR_LEN	0x80000
10#endif
11
12OUTPUT_ARCH(powerpc)
13/* Do we need any of these for elf?
14   __DYNAMIC = 0;    */
15PHDRS
16{
17  text PT_LOAD;
18  bss PT_LOAD;
19}
20
21SECTIONS
22{
23  /* Read-only sections, merged into text segment: */
24  . = + SIZEOF_HEADERS;
25  .interp : { *(.interp) }
26  .text      :
27  {
28    *(.text*)
29   } :text
30    _etext = .;
31    PROVIDE (etext = .);
32    .rodata    :
33   {
34    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
35  } :text
36
37  /* Read-write section, merged into data segment: */
38  . = (. + 0x00FF) & 0xFFFFFF00;
39  _erotext = .;
40  PROVIDE (erotext = .);
41  .reloc   :
42  {
43    _GOT2_TABLE_ = .;
44    KEEP(*(.got2))
45    KEEP(*(.got))
46    _FIXUP_TABLE_ = .;
47    KEEP(*(.fixup))
48  }
49  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
50  __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
51
52  .data    :
53  {
54    *(.data*)
55    *(.sdata*)
56  }
57  _edata  =  .;
58  PROVIDE (edata = .);
59
60  . = .;
61
62  .u_boot_list : {
63	KEEP(*(SORT(.u_boot_list*)));
64  }
65
66  . = .;
67  __start___ex_table = .;
68  __ex_table : { *(__ex_table) }
69  __stop___ex_table = .;
70
71  . = ALIGN(256);
72  __init_begin = .;
73  .text.init : { *(.text.init) }
74  .data.init : { *(.data.init) }
75  . = ALIGN(256);
76  __init_end = .;
77
78  .bootpg ADDR(.text) - 0x1000 :
79  {
80    KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
81  } :text = 0xffff
82
83  . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
84
85  __bss_start = .;
86  .bss (NOLOAD)       :
87  {
88   *(.sbss*)
89   *(.bss*)
90   *(COMMON)
91  } :bss
92
93  . = ALIGN(4);
94  __bss_end = . ;
95  PROVIDE (end = .);
96}
97