]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/mips/cpu/u-boot.lds
mips: bmips: add bcm6328-power-domain driver support for BCM6328
[people/ms/u-boot.git] / arch / mips / cpu / u-boot.lds
CommitLineData
cb5dbca8
GJ
1/*
2 * (C) Copyright 2003
3 * Wolfgang Denk Engineering, <wd@denx.de>
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
cb5dbca8
GJ
6 */
7
8#if defined(CONFIG_64BIT)
9#define PTR_COUNT_SHIFT 3
10#else
11#define PTR_COUNT_SHIFT 2
12#endif
13
14OUTPUT_ARCH(mips)
15ENTRY(_start)
16SECTIONS
17{
18 . = 0x00000000;
19
20 . = ALIGN(4);
21 .text : {
d263cda5 22 __text_start = .;
cb5dbca8 23 *(.text*)
d263cda5 24 __text_end = .;
cb5dbca8
GJ
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
37 . = .;
38 _gp = ALIGN(16) + 0x7ff0;
39
40 .got : {
cb5dbca8 41 *(.got)
cb5dbca8
GJ
42 }
43
45397816
GJ
44 num_got_entries = SIZEOF(.got) >> PTR_COUNT_SHIFT;
45
cb5dbca8
GJ
46 . = ALIGN(4);
47 .sdata : {
48 *(.sdata*)
49 }
50
51 . = ALIGN(4);
52 .u_boot_list : {
ef123c52 53 KEEP(*(SORT(.u_boot_list*)));
cb5dbca8
GJ
54 }
55
cb5dbca8 56 . = ALIGN(4);
3420bf1c 57 __image_copy_end = .;
a0af08b9 58 __init_end = .;
3420bf1c 59
0ba8926e
GJ
60 .rel.dyn : {
61 __rel_dyn_start = .;
62 *(.rel.dyn)
63 __rel_dyn_end = .;
64 }
65
265072ba
DS
66 .padding : {
67 /*
68 * Workaround for a binutils feature (or bug?).
69 *
70 * The GNU ld from binutils puts the dynamic relocation
71 * entries into the .rel.dyn section. Sometimes it
72 * allocates more dynamic relocation entries than it needs
73 * and the unused slots are set to R_MIPS_NONE entries.
74 *
75 * However the size of the .rel.dyn section in the ELF
76 * section header does not cover the unused entries, so
77 * objcopy removes those during stripping.
78 *
79 * Create a small section here to avoid that.
80 */
81 LONG(0xFFFFFFFF)
82 }
83
79fd7e64 84 _end = .;
0ba8926e
GJ
85
86 .bss __rel_dyn_start (OVERLAY) : {
a52852c5
DS
87 __bss_start = .;
88 *(.sbss.*)
89 *(.bss.*)
90 *(COMMON)
cb5dbca8 91 . = ALIGN(4);
a52852c5 92 __bss_end = .;
cb5dbca8 93 }
0ba8926e 94
79fd7e64
DS
95 .dynsym _end : {
96 *(.dynsym)
97 }
98
99 .dynbss : {
0ba8926e 100 *(.dynbss)
79fd7e64
DS
101 }
102
103 .dynstr : {
0ba8926e 104 *(.dynstr)
79fd7e64
DS
105 }
106
107 .dynamic : {
0ba8926e 108 *(.dynamic)
79fd7e64
DS
109 }
110
111 .plt : {
112 *(.plt)
113 }
114
115 .interp : {
0ba8926e 116 *(.interp)
79fd7e64
DS
117 }
118
119 .gnu : {
120 *(.gnu*)
121 }
122
123 .MIPS.stubs : {
124 *(.MIPS.stubs)
125 }
126
127 .hash : {
0ba8926e 128 *(.hash)
0ba8926e 129 }
cb5dbca8 130}