Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 1 | /* |
2 | * (C) Copyright 2003 | ||||
3 | * Wolfgang Denk Engineering, <wd@denx.de> | ||||
4 | * | ||||
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 6 | */ |
7 | |||||
8 | #if defined(CONFIG_64BIT) | ||||
9 | #define PTR_COUNT_SHIFT 3 | ||||
10 | #else | ||||
11 | #define PTR_COUNT_SHIFT 2 | ||||
12 | #endif | ||||
13 | |||||
14 | OUTPUT_ARCH(mips) | ||||
15 | ENTRY(_start) | ||||
16 | SECTIONS | ||||
17 | { | ||||
18 | . = 0x00000000; | ||||
19 | |||||
20 | . = ALIGN(4); | ||||
21 | .text : { | ||||
Paul Burton | 92a06ee | 2016-09-21 11:11:06 +0100 | [diff] [blame] | 22 | __text_start = .; |
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 23 | *(.text*) |
Paul Burton | 92a06ee | 2016-09-21 11:11:06 +0100 | [diff] [blame] | 24 | __text_end = .; |
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 25 | } |
26 | |||||
27 | . = ALIGN(4); | ||||
28 | .rodata : { | ||||
29 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | ||||
30 | } | ||||
31 | |||||
32 | . = ALIGN(4); | ||||
33 | .data : { | ||||
34 | *(.data*) | ||||
35 | } | ||||
36 | |||||
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 37 | . = ALIGN(4); |
38 | .sdata : { | ||||
39 | *(.sdata*) | ||||
40 | } | ||||
41 | |||||
42 | . = ALIGN(4); | ||||
43 | .u_boot_list : { | ||||
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 44 | KEEP(*(SORT(.u_boot_list*))); |
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 45 | } |
46 | |||||
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 47 | . = ALIGN(4); |
Daniel Schwierzeck | 9049d03 | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 48 | __image_copy_end = .; |
Paul Burton | d0589bb | 2014-04-07 10:11:19 +0100 | [diff] [blame] | 49 | __init_end = .; |
Daniel Schwierzeck | 9049d03 | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 50 | |
Paul Burton | d3a278d | 2017-06-19 11:53:47 -0700 | [diff] [blame] | 51 | /* |
52 | * .rel must come last so that the mips-relocs tool can shrink | ||||
53 | * the section size & the PT_LOAD program header filesz. | ||||
54 | */ | ||||
55 | .rel : { | ||||
56 | __rel_start = .; | ||||
57 | BYTE(0x0) | ||||
58 | . += (32 * 1024) - 1; | ||||
Daniel Schwierzeck | 4e6cdff | 2014-10-29 17:30:36 +0100 | [diff] [blame] | 59 | } |
60 | |||||
Daniel Schwierzeck | 1263ea8 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 61 | _end = .; |
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 62 | |
Paul Burton | d3a278d | 2017-06-19 11:53:47 -0700 | [diff] [blame] | 63 | .bss __rel_start (OVERLAY) : { |
Daniel Schwierzeck | 56b5ec7 | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 64 | __bss_start = .; |
65 | *(.sbss.*) | ||||
66 | *(.bss.*) | ||||
67 | *(COMMON) | ||||
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 68 | . = ALIGN(4); |
Daniel Schwierzeck | 56b5ec7 | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 69 | __bss_end = .; |
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 70 | } |
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 71 | |
Daniel Schwierzeck | 1263ea8 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 72 | .dynsym _end : { |
73 | *(.dynsym) | ||||
74 | } | ||||
75 | |||||
76 | .dynbss : { | ||||
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 77 | *(.dynbss) |
Daniel Schwierzeck | 1263ea8 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 78 | } |
79 | |||||
80 | .dynstr : { | ||||
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 81 | *(.dynstr) |
Daniel Schwierzeck | 1263ea8 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 82 | } |
83 | |||||
84 | .dynamic : { | ||||
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 85 | *(.dynamic) |
Daniel Schwierzeck | 1263ea8 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 86 | } |
87 | |||||
88 | .plt : { | ||||
89 | *(.plt) | ||||
90 | } | ||||
91 | |||||
92 | .interp : { | ||||
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 93 | *(.interp) |
Daniel Schwierzeck | 1263ea8 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 94 | } |
95 | |||||
96 | .gnu : { | ||||
97 | *(.gnu*) | ||||
98 | } | ||||
99 | |||||
100 | .MIPS.stubs : { | ||||
101 | *(.MIPS.stubs) | ||||
102 | } | ||||
103 | |||||
104 | .hash : { | ||||
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 105 | *(.hash) |
Gabor Juhos | 44ea3c3 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 106 | } |
Gabor Juhos | 7f44466 | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 107 | } |