Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2006 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | OUTPUT_ARCH(powerpc) |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 9 | SECTIONS |
| 10 | { |
| 11 | /* Read-only sections, merged into text segment: */ |
| 12 | . = + SIZEOF_HEADERS; |
| 13 | .interp : { *(.interp) } |
| 14 | .hash : { *(.hash) } |
| 15 | .dynsym : { *(.dynsym) } |
| 16 | .dynstr : { *(.dynstr) } |
| 17 | .rel.text : { *(.rel.text) } |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 18 | .rela.text : { *(.rela.text) } |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 19 | .rel.data : { *(.rel.data) } |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 20 | .rela.data : { *(.rela.data) } |
| 21 | .rel.rodata : { *(.rel.rodata) } |
| 22 | .rela.rodata : { *(.rela.rodata) } |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 23 | .rel.got : { *(.rel.got) } |
| 24 | .rela.got : { *(.rela.got) } |
| 25 | .rel.ctors : { *(.rel.ctors) } |
| 26 | .rela.ctors : { *(.rela.ctors) } |
| 27 | .rel.dtors : { *(.rel.dtors) } |
| 28 | .rela.dtors : { *(.rela.dtors) } |
| 29 | .rel.bss : { *(.rel.bss) } |
| 30 | .rela.bss : { *(.rela.bss) } |
| 31 | .rel.plt : { *(.rel.plt) } |
| 32 | .rela.plt : { *(.rela.plt) } |
| 33 | .init : { *(.init) } |
| 34 | .plt : { *(.plt) } |
| 35 | .text : |
| 36 | { |
| 37 | /* WARNING - the following is hand-optimized to fit within */ |
| 38 | /* the sector layout of our flash chips! XXX FIXME XXX */ |
| 39 | |
Stefan Roese | a47a12b | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 40 | arch/powerpc/cpu/ppc4xx/start.o (.text) |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 41 | |
| 42 | /* Align to next NAND block */ |
| 43 | . = ALIGN(0x4000); |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 44 | common/env_embedded.o (.ppcenv) |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 45 | /* Keep some space here for redundant env and potential bad env blocks */ |
| 46 | . = ALIGN(0x10000); |
| 47 | |
| 48 | *(.text) |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 49 | *(.got1) |
| 50 | } |
| 51 | _etext = .; |
| 52 | PROVIDE (etext = .); |
| 53 | .rodata : |
| 54 | { |
Trent Piepho | f62fb99 | 2009-02-18 15:22:05 -0800 | [diff] [blame] | 55 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 56 | } |
| 57 | .fini : { *(.fini) } =0 |
| 58 | .ctors : { *(.ctors) } |
| 59 | .dtors : { *(.dtors) } |
| 60 | |
| 61 | /* Read-write section, merged into data segment: */ |
| 62 | . = (. + 0x00FF) & 0xFFFFFF00; |
| 63 | _erotext = .; |
| 64 | PROVIDE (erotext = .); |
| 65 | .reloc : |
| 66 | { |
| 67 | *(.got) |
| 68 | _GOT2_TABLE_ = .; |
| 69 | *(.got2) |
| 70 | _FIXUP_TABLE_ = .; |
| 71 | *(.fixup) |
| 72 | } |
| 73 | __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |
| 74 | __fixup_entries = (. - _FIXUP_TABLE_)>>2; |
| 75 | |
| 76 | .data : |
| 77 | { |
| 78 | *(.data) |
| 79 | *(.data1) |
| 80 | *(.sdata) |
| 81 | *(.sdata2) |
| 82 | *(.dynamic) |
| 83 | CONSTRUCTORS |
| 84 | } |
| 85 | _edata = .; |
| 86 | PROVIDE (edata = .); |
| 87 | |
| 88 | . = .; |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 89 | |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 90 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 91 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 92 | } |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 93 | |
| 94 | . = .; |
| 95 | __start___ex_table = .; |
| 96 | __ex_table : { *(__ex_table) } |
| 97 | __stop___ex_table = .; |
| 98 | |
| 99 | . = ALIGN(256); |
| 100 | __init_begin = .; |
| 101 | .text.init : { *(.text.init) } |
| 102 | .data.init : { *(.data.init) } |
| 103 | . = ALIGN(256); |
| 104 | __init_end = .; |
| 105 | |
| 106 | __bss_start = .; |
Wolfgang Denk | 64134f0 | 2008-01-12 20:31:39 +0100 | [diff] [blame] | 107 | .bss (NOLOAD) : |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 108 | { |
| 109 | *(.sbss) *(.scommon) |
| 110 | *(.dynbss) |
| 111 | *(.bss) |
| 112 | *(COMMON) |
Selvamuthukumar | 9b827cf | 2008-10-16 22:54:03 +0530 | [diff] [blame] | 113 | . = ALIGN(4); |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 114 | } |
| 115 | |
Simon Glass | 3929fb0 | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 116 | __bss_end = . ; |
Matthias Fuchs | 72c5d52 | 2007-12-28 17:07:14 +0100 | [diff] [blame] | 117 | PROVIDE (end = .); |
| 118 | } |