wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 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+ |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | OUTPUT_ARCH(powerpc) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 9 | /* Do we need any of these for elf? |
| 10 | __DYNAMIC = 0; */ |
| 11 | SECTIONS |
| 12 | { |
| 13 | /* Read-only sections, merged into text segment: */ |
| 14 | . = + SIZEOF_HEADERS; |
| 15 | .interp : { *(.interp) } |
| 16 | .hash : { *(.hash) } |
| 17 | .dynsym : { *(.dynsym) } |
| 18 | .dynstr : { *(.dynstr) } |
| 19 | .rel.text : { *(.rel.text) } |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 20 | .rela.text : { *(.rela.text) } |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 21 | .rel.data : { *(.rel.data) } |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 22 | .rela.data : { *(.rela.data) } |
| 23 | .rel.rodata : { *(.rel.rodata) } |
| 24 | .rela.rodata : { *(.rela.rodata) } |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 25 | .rel.got : { *(.rel.got) } |
| 26 | .rela.got : { *(.rela.got) } |
| 27 | .rel.ctors : { *(.rel.ctors) } |
| 28 | .rela.ctors : { *(.rela.ctors) } |
| 29 | .rel.dtors : { *(.rel.dtors) } |
| 30 | .rela.dtors : { *(.rela.dtors) } |
| 31 | .rel.bss : { *(.rel.bss) } |
| 32 | .rela.bss : { *(.rela.bss) } |
| 33 | .rel.plt : { *(.rel.plt) } |
| 34 | .rela.plt : { *(.rela.plt) } |
| 35 | .init : { *(.init) } |
| 36 | .plt : { *(.plt) } |
| 37 | .text : |
| 38 | { |
| 39 | /* WARNING - the following is hand-optimized to fit within */ |
| 40 | /* the sector layout of our flash chips! XXX FIXME XXX */ |
| 41 | |
Stefan Roese | a47a12b | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 42 | arch/powerpc/cpu/mpc8260/start.o (.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 43 | /* |
| 44 | common/dlmalloc.o (.text) |
Stefan Roese | a47a12b | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 45 | arch/powerpc/lib/ppcstring.o (.text) |
Peter Tyser | 78acc47 | 2010-04-12 22:28:05 -0500 | [diff] [blame] | 46 | lib/vsprintf.o (.text) |
| 47 | lib/crc32.o (.text) |
| 48 | lib/zlib.o (.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 49 | |
| 50 | . = env_offset; |
| 51 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 52 | common/env_embedded.o(.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 53 | |
| 54 | *(.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 55 | *(.got1) |
| 56 | } |
| 57 | _etext = .; |
| 58 | PROVIDE (etext = .); |
| 59 | .rodata : |
| 60 | { |
Wolfgang Denk | 7481266 | 2005-12-12 16:06:05 +0100 | [diff] [blame] | 61 | *(.eh_frame) |
Trent Piepho | f62fb99 | 2009-02-18 15:22:05 -0800 | [diff] [blame] | 62 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 63 | } |
| 64 | .fini : { *(.fini) } =0 |
| 65 | .ctors : { *(.ctors) } |
| 66 | .dtors : { *(.dtors) } |
| 67 | |
| 68 | /* Read-write section, merged into data segment: */ |
| 69 | . = (. + 0x0FFF) & 0xFFFFF000; |
| 70 | _erotext = .; |
| 71 | PROVIDE (erotext = .); |
| 72 | .reloc : |
| 73 | { |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 74 | _GOT2_TABLE_ = .; |
Wolfgang Denk | 9e2b517 | 2011-05-01 04:35:06 +0000 | [diff] [blame] | 75 | KEEP(*(.got2)) |
| 76 | KEEP(*(.got)) |
| 77 | PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 78 | _FIXUP_TABLE_ = .; |
| 79 | *(.fixup) |
| 80 | } |
Joakim Tjernlund | 9d8fbd1 | 2011-04-20 14:22:59 +0200 | [diff] [blame] | 81 | __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 82 | __fixup_entries = (. - _FIXUP_TABLE_)>>2; |
| 83 | |
| 84 | .data : |
| 85 | { |
| 86 | *(.data) |
| 87 | *(.data1) |
| 88 | *(.sdata) |
| 89 | *(.sdata2) |
| 90 | *(.dynamic) |
| 91 | CONSTRUCTORS |
| 92 | } |
| 93 | _edata = .; |
| 94 | PROVIDE (edata = .); |
| 95 | |
Wolfgang Denk | 807d5d7 | 2005-08-31 12:28:00 +0200 | [diff] [blame] | 96 | . = .; |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 97 | |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 98 | . = ALIGN(4); |
| 99 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 100 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 101 | } |
| 102 | |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 103 | |
Wolfgang Denk | 807d5d7 | 2005-08-31 12:28:00 +0200 | [diff] [blame] | 104 | . = .; |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 105 | __start___ex_table = .; |
| 106 | __ex_table : { *(__ex_table) } |
| 107 | __stop___ex_table = .; |
| 108 | |
| 109 | . = ALIGN(4096); |
| 110 | __init_begin = .; |
| 111 | .text.init : { *(.text.init) } |
| 112 | .data.init : { *(.data.init) } |
| 113 | . = ALIGN(4096); |
| 114 | __init_end = .; |
| 115 | |
| 116 | __bss_start = .; |
Wolfgang Denk | 64134f0 | 2008-01-12 20:31:39 +0100 | [diff] [blame] | 117 | .bss (NOLOAD) : |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 118 | { |
| 119 | *(.sbss) *(.scommon) |
| 120 | *(.dynbss) |
| 121 | *(.bss) |
| 122 | *(COMMON) |
| 123 | } |
| 124 | . = ALIGN(256 * 1024); |
| 125 | .ppcenv : |
| 126 | { |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 127 | common/env_embedded.o (.ppcenv) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 128 | } |
Selvamuthukumar | 9b827cf | 2008-10-16 22:54:03 +0530 | [diff] [blame] | 129 | . = ALIGN(4); |
Simon Glass | 3929fb0 | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 130 | __bss_end = . ; |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 131 | PROVIDE (end = .); |
| 132 | } |