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 | d79de1d | 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 | a1be476 | 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 | a1be476 | 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 | 88fbf93 | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 42 | arch/powerpc/cpu/mpc8xx/start.o (.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 43 | common/dlmalloc.o (.text) |
Stefan Roese | 88fbf93 | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 44 | arch/powerpc/lib/ppcstring.o (.text) |
Peter Tyser | 685b7f5 | 2010-04-12 22:28:05 -0500 | [diff] [blame] | 45 | lib/vsprintf.o (.text) |
| 46 | lib/crc32.o (.text) |
| 47 | lib/zlib.o (.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 48 | |
| 49 | . = env_offset; |
Jean-Christophe PLAGNIOL-VILLARD | 4436c1e | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 50 | common/env_embedded.o(.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 51 | *(.text) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 52 | *(.got1) |
| 53 | } |
| 54 | _etext = .; |
| 55 | PROVIDE (etext = .); |
| 56 | .rodata : |
| 57 | { |
| 58 | *(.rodata) |
| 59 | *(.rodata1) |
Wolfgang Denk | aaa7c00 | 2005-12-12 16:06:05 +0100 | [diff] [blame] | 60 | *(.rodata.str1.4) |
| 61 | *(.eh_frame) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 62 | } |
| 63 | .fini : { *(.fini) } =0 |
| 64 | .ctors : { *(.ctors) } |
| 65 | .dtors : { *(.dtors) } |
| 66 | |
| 67 | /* Read-write section, merged into data segment: */ |
| 68 | . = (. + 0x0FFF) & 0xFFFFF000; |
| 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 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 94 | |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 95 | . = ALIGN(4); |
| 96 | .u_boot_list : { |
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 97 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 98 | } |
| 99 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 100 | |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 101 | __start___ex_table = .; |
| 102 | __ex_table : { *(__ex_table) } |
| 103 | __stop___ex_table = .; |
| 104 | |
| 105 | . = ALIGN(4096); |
| 106 | __init_begin = .; |
| 107 | .text.init : { *(.text.init) } |
| 108 | .data.init : { *(.data.init) } |
| 109 | . = ALIGN(4096); |
| 110 | __init_end = .; |
| 111 | |
| 112 | __bss_start = .; |
| 113 | .bss : |
| 114 | { |
| 115 | *(.sbss) *(.scommon) |
| 116 | *(.dynbss) |
| 117 | *(.bss) |
| 118 | *(COMMON) |
| 119 | } |
| 120 | . = ALIGN(256 * 1024); |
| 121 | .ppcenv : |
| 122 | { |
Jean-Christophe PLAGNIOL-VILLARD | 4436c1e | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 123 | common/env_embedded.o (.ppcenv) |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 124 | } |
Albert ARIBAUD | 0198f9d | 2013-03-30 00:19:53 +0000 | [diff] [blame] | 125 | __bss_end = . ; |
wdenk | efee170 | 2002-07-20 20:14:13 +0000 | [diff] [blame] | 126 | PROVIDE (end = .); |
| 127 | } |