Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * Wolfgang Denk Engineering, <wd@denx.de> |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | #if defined(CONFIG_64BIT) |
| 25 | #define PTR_COUNT_SHIFT 3 |
| 26 | #else |
| 27 | #define PTR_COUNT_SHIFT 2 |
| 28 | #endif |
| 29 | |
| 30 | OUTPUT_ARCH(mips) |
| 31 | ENTRY(_start) |
| 32 | SECTIONS |
| 33 | { |
| 34 | . = 0x00000000; |
| 35 | |
| 36 | . = ALIGN(4); |
| 37 | .text : { |
| 38 | *(.text*) |
| 39 | } |
| 40 | |
| 41 | . = ALIGN(4); |
| 42 | .rodata : { |
| 43 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 44 | } |
| 45 | |
| 46 | . = ALIGN(4); |
| 47 | .data : { |
| 48 | *(.data*) |
| 49 | } |
| 50 | |
| 51 | . = .; |
| 52 | _gp = ALIGN(16) + 0x7ff0; |
| 53 | |
| 54 | .got : { |
| 55 | __got_start = .; |
| 56 | *(.got) |
| 57 | __got_end = .; |
| 58 | } |
| 59 | |
| 60 | . = ALIGN(4); |
| 61 | .sdata : { |
| 62 | *(.sdata*) |
| 63 | } |
| 64 | |
| 65 | . = ALIGN(4); |
| 66 | .u_boot_list : { |
| 67 | #include <u-boot.lst> |
| 68 | } |
| 69 | |
| 70 | uboot_end_data = .; |
| 71 | |
| 72 | num_got_entries = (__got_end - __got_start) >> PTR_COUNT_SHIFT; |
| 73 | |
| 74 | . = ALIGN(4); |
| 75 | .sbss : { |
| 76 | *(.sbss*) |
| 77 | } |
| 78 | |
| 79 | .bss : { |
| 80 | *(.bss*) |
| 81 | . = ALIGN(4); |
| 82 | } |
| 83 | uboot_end = .; |
| 84 | } |