Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 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 | |
| 23 | OUTPUT_ARCH(powerpc) |
| 24 | /* Do we need any of these for elf? |
| 25 | __DYNAMIC = 0; */ |
| 26 | PHDRS |
| 27 | { |
| 28 | text PT_LOAD; |
| 29 | bss PT_LOAD; |
| 30 | } |
| 31 | |
| 32 | SECTIONS |
| 33 | { |
| 34 | /* Read-only sections, merged into text segment: */ |
| 35 | . = + SIZEOF_HEADERS; |
| 36 | .interp : { *(.interp) } |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 37 | .text : |
| 38 | { |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 39 | *(.text*) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 40 | } :text |
| 41 | _etext = .; |
| 42 | PROVIDE (etext = .); |
| 43 | .rodata : |
| 44 | { |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 45 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 46 | } :text |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 47 | |
| 48 | /* Read-write section, merged into data segment: */ |
| 49 | . = (. + 0x00FF) & 0xFFFFFF00; |
| 50 | _erotext = .; |
| 51 | PROVIDE (erotext = .); |
| 52 | .reloc : |
| 53 | { |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 54 | KEEP(*(.got)) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 55 | _GOT2_TABLE_ = .; |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 56 | KEEP(*(.got2)) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 57 | _FIXUP_TABLE_ = .; |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 58 | KEEP(*(.fixup)) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 59 | } |
| 60 | __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; |
| 61 | __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |
| 62 | |
| 63 | .data : |
| 64 | { |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 65 | *(.data*) |
| 66 | *(.sdata*) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 67 | } |
| 68 | _edata = .; |
| 69 | PROVIDE (edata = .); |
| 70 | |
| 71 | . = .; |
| 72 | __u_boot_cmd_start = .; |
| 73 | .u_boot_cmd : { *(.u_boot_cmd) } |
| 74 | __u_boot_cmd_end = .; |
| 75 | |
| 76 | . = .; |
| 77 | __start___ex_table = .; |
| 78 | __ex_table : { *(__ex_table) } |
| 79 | __stop___ex_table = .; |
| 80 | |
| 81 | . = ALIGN(256); |
| 82 | __init_begin = .; |
| 83 | .text.init : { *(.text.init) } |
| 84 | .data.init : { *(.data.init) } |
| 85 | . = ALIGN(256); |
| 86 | __init_end = .; |
| 87 | |
| 88 | .bootpg ADDR(.text) - 0x1000 : |
| 89 | { |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 90 | arch/powerpc/cpu/mpc85xx/start.o KEEP(*(.bootpg)) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 91 | } :text = 0xffff |
| 92 | |
| 93 | . = ADDR(.text) + 0x80000; |
| 94 | |
| 95 | __bss_start = .; |
| 96 | .bss (NOLOAD) : |
| 97 | { |
Haiying Wang | 36ae6a8 | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 98 | *(.sbss*) |
| 99 | *(.bss*) |
Mingkai Hu | 7da5335 | 2009-09-11 14:19:10 +0800 | [diff] [blame] | 100 | *(COMMON) |
| 101 | } :bss |
| 102 | |
| 103 | . = ALIGN(4); |
| 104 | _end = . ; |
| 105 | PROVIDE (end = .); |
| 106 | } |