1/*
2 * Copyright 2009 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  .hash          : { *(.hash)		}
38  .dynsym        : { *(.dynsym)		}
39  .dynstr        : { *(.dynstr)		}
40  .rel.text      : { *(.rel.text)		}
41  .rela.text     : { *(.rela.text)	}
42  .rel.data      : { *(.rel.data)		}
43  .rela.data     : { *(.rela.data)	}
44  .rel.rodata    : { *(.rel.rodata)	}
45  .rela.rodata   : { *(.rela.rodata)	}
46  .rel.got       : { *(.rel.got)		}
47  .rela.got      : { *(.rela.got)		}
48  .rel.ctors     : { *(.rel.ctors)	}
49  .rela.ctors    : { *(.rela.ctors)	}
50  .rel.dtors     : { *(.rel.dtors)	}
51  .rela.dtors    : { *(.rela.dtors)	}
52  .rel.bss       : { *(.rel.bss)		}
53  .rela.bss      : { *(.rela.bss)		}
54  .rel.plt       : { *(.rel.plt)		}
55  .rela.plt      : { *(.rela.plt)		}
56  .init          : { *(.init)	}
57  .plt : { *(.plt) }
58  .text      :
59  {
60    *(.text)
61    *(.got1)
62   } :text
63    _etext = .;
64    PROVIDE (etext = .);
65    .rodata    :
66   {
67    *(.eh_frame)
68    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
69  } :text
70  .fini      : { *(.fini)    } =0
71  .ctors     : { *(.ctors)   }
72  .dtors     : { *(.dtors)   }
73
74  /* Read-write section, merged into data segment: */
75  . = (. + 0x00FF) & 0xFFFFFF00;
76  _erotext = .;
77  PROVIDE (erotext = .);
78  .reloc   :
79  {
80    *(.got)
81    _GOT2_TABLE_ = .;
82    *(.got2)
83    _FIXUP_TABLE_ = .;
84    *(.fixup)
85  }
86  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
87  __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
88
89  .data    :
90  {
91    *(.data)
92    *(.data1)
93    *(.sdata)
94    *(.sdata2)
95    *(.dynamic)
96    CONSTRUCTORS
97  }
98  _edata  =  .;
99  PROVIDE (edata = .);
100
101  . = .;
102  __u_boot_cmd_start = .;
103  .u_boot_cmd : { *(.u_boot_cmd) }
104  __u_boot_cmd_end = .;
105
106  . = .;
107  __start___ex_table = .;
108  __ex_table : { *(__ex_table) }
109  __stop___ex_table = .;
110
111  . = ALIGN(256);
112  __init_begin = .;
113  .text.init : { *(.text.init) }
114  .data.init : { *(.data.init) }
115  . = ALIGN(256);
116  __init_end = .;
117
118  .bootpg ADDR(.text) - 0x1000 :
119  {
120    arch/powerpc/cpu/mpc85xx/start.o	(.bootpg)
121  } :text = 0xffff
122
123  . = ADDR(.text) + 0x80000;
124
125  __bss_start = .;
126  .bss (NOLOAD)       :
127  {
128   *(.sbss) *(.scommon)
129   *(.dynbss)
130   *(.bss)
131   *(COMMON)
132  } :bss
133
134  . = ALIGN(4);
135  _end = . ;
136  PROVIDE (end = .);
137}
138