blob: bee4d9a9a24d25daf5a16e35bf6b77b0962e2f70 [file] [log] [blame]
Larry Johnson67682672008-03-17 11:10:35 -05001/*
2 * (C) Copyright 2002
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Larry Johnson67682672008-03-17 11:10:35 -05006 */
7
8OUTPUT_ARCH(powerpc)
Larry Johnson67682672008-03-17 11:10:35 -05009/* Do we need any of these for elf?
10 __DYNAMIC = 0; */
11SECTIONS
12{
13 .resetvec 0xF7FBFFFC :
14 {
15 *(.resetvec)
16 } = 0xffff
17
18 .bootpg 0xF7FBF000 :
19 {
Stefan Roese88fbf932010-04-15 16:07:28 +020020 arch/powerpc/cpu/ppc4xx/start.o (.bootpg)
Larry Johnson67682672008-03-17 11:10:35 -050021 } = 0xffff
22
23 /* Read-only sections, merged into text segment: */
24 . = + SIZEOF_HEADERS;
25 .interp : { *(.interp) }
26 .hash : { *(.hash) }
27 .dynsym : { *(.dynsym) }
28 .dynstr : { *(.dynstr) }
29 .rel.text : { *(.rel.text) }
Wolfgang Denka1be4762008-05-20 16:00:29 +020030 .rela.text : { *(.rela.text) }
Larry Johnson67682672008-03-17 11:10:35 -050031 .rel.data : { *(.rel.data) }
Wolfgang Denka1be4762008-05-20 16:00:29 +020032 .rela.data : { *(.rela.data) }
33 .rel.rodata : { *(.rel.rodata) }
34 .rela.rodata : { *(.rela.rodata) }
Larry Johnson67682672008-03-17 11:10:35 -050035 .rel.got : { *(.rel.got) }
36 .rela.got : { *(.rela.got) }
37 .rel.ctors : { *(.rel.ctors) }
38 .rela.ctors : { *(.rela.ctors) }
39 .rel.dtors : { *(.rel.dtors) }
40 .rela.dtors : { *(.rela.dtors) }
41 .rel.bss : { *(.rel.bss) }
42 .rela.bss : { *(.rela.bss) }
43 .rel.plt : { *(.rel.plt) }
44 .rela.plt : { *(.rela.plt) }
45 .init : { *(.init) }
46 .plt : { *(.plt) }
47 .text :
48 {
49 /* WARNING - the following is hand-optimized to fit within */
50 /* the sector layout of our flash chips! XXX FIXME XXX */
51
Stefan Roese88fbf932010-04-15 16:07:28 +020052 arch/powerpc/cpu/ppc4xx/start.o (.text)
Larry Johnson67682672008-03-17 11:10:35 -050053
54 *(.text)
Larry Johnson67682672008-03-17 11:10:35 -050055 *(.got1)
56 }
57 _etext = .;
58 PROVIDE (etext = .);
59 .rodata :
60 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080061 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Larry Johnson67682672008-03-17 11:10:35 -050062 }
63 .fini : { *(.fini) } =0
64 .ctors : { *(.ctors) }
65 .dtors : { *(.dtors) }
66
67 /* Read-write section, merged into data segment: */
68 . = (. + 0x00FF) & 0xFFFFFF00;
69 _erotext = .;
70 PROVIDE (erotext = .);
71 .reloc :
72 {
73 *(.got)
74 _GOT2_TABLE_ = .;
75 *(.got2)
76 _FIXUP_TABLE_ = .;
77 *(.fixup)
78 }
79 __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
80 __fixup_entries = (. - _FIXUP_TABLE_)>>2;
81
82 .data :
83 {
84 *(.data)
85 *(.data1)
86 *(.sdata)
87 *(.sdata2)
88 *(.dynamic)
89 CONSTRUCTORS
90 }
91 _edata = .;
92 PROVIDE (edata = .);
93
94 . = .;
Larry Johnson67682672008-03-17 11:10:35 -050095
Marek Vasut607092a2012-10-12 10:27:03 +000096 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000097 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000098 }
Larry Johnson67682672008-03-17 11:10:35 -050099
100 . = .;
101 __start___ex_table = .;
102 __ex_table : { *(__ex_table) }
103 __stop___ex_table = .;
104
105 . = ALIGN(256);
106 __init_begin = .;
107 .text.init : { *(.text.init) }
108 .data.init : { *(.data.init) }
109 . = ALIGN(256);
110 __init_end = .;
111
112 __bss_start = .;
113 .bss (NOLOAD) :
114 {
115 *(.sbss) *(.scommon)
116 *(.dynbss)
117 *(.bss)
118 *(COMMON)
Selvamuthukumard2454ba2008-10-16 22:54:03 +0530119 . = ALIGN(4);
Larry Johnson67682672008-03-17 11:10:35 -0500120 }
121
Simon Glassed70c8f2013-03-14 06:54:53 +0000122 __bss_end = . ;
Larry Johnson67682672008-03-17 11:10:35 -0500123 PROVIDE (end = .);
124}