summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/pbl.lds.S
blob: 75069b0c50d69b3e976ddabbc8ee1f38282ea8a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * (C) Copyright 2018 Oleksij Rempel <o.rempel@pengutronix.de>, Pengutronix
 * (C) Copyright 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
 */

#include <asm-generic/barebox.lds.h>
#include <asm-generic/memory_layout.h>
#include <linux/sizes.h>

#define BASE    (TEXT_BASE - SZ_2M)

OUTPUT_ARCH("mips")
SECTIONS
{
	. = BASE;

	PRE_IMAGE

	. = ALIGN(4);
	.text      :
	{
		_stext = .;
		_text = .;
		*(.text_head_entry*)
		__bare_init_start = .;
		*(.text_bare_init*)
		__bare_init_end = .;
		*(.text*)
	}

	BAREBOX_BARE_INIT_SIZE

	. = ALIGN(4);
	.rodata : { *(.rodata*) }

	.barebox_imd : { BAREBOX_IMD }

	_etext = .;			/* End of text and rodata section */

	. = ALIGN(4);
	.data : { *(.data*) }

	pbl_code_size =  . - BASE;

	. = ALIGN(4);
	__piggydata_start = .;
	.piggydata : {
		*(.piggydata)
	}
	__piggydata_end = . - BASE;

	pbl_image_size =  .;

	. = ALIGN(4);
	__bss_start = .;
	.bss : { *(.bss*) }
	__bss_stop = .;
	pbl_memory_size =  . - BASE;
	_end = .;
}