Linux 6.16-rc6
[linux-2.6-block.git] / arch / mips / boot / compressed / ld.script
CommitLineData
d4d9a553
WZ
1/*
2 * ld.script for compressed kernel support of MIPS
3 *
4 * Copyright (C) 2009 Lemote Inc.
bdbffd9b
WZ
5 * Author: Wu Zhangjin <wuzhanjing@gmail.com>
6 * Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com>
d4d9a553
WZ
7 */
8
1b93b3c3
WZ
9OUTPUT_ARCH(mips)
10ENTRY(start)
e970a72e
FF
11PHDRS {
12 text PT_LOAD FLAGS(7); /* RWX */
13}
1b93b3c3
WZ
14SECTIONS
15{
bdbffd9b
WZ
16 /* Text and read-only data */
17 /* . = VMLINUZ_LOAD_ADDRESS; */
18 .text : {
d4d9a553
WZ
19 *(.text)
20 *(.rodata)
e970a72e 21 }: text
bdbffd9b 22 /* End of text section */
1b93b3c3 23
bdbffd9b
WZ
24 /* Writable data */
25 .data : {
d4d9a553 26 *(.data)
bdbffd9b 27 /* Put the compressed image here */
d4d9a553
WZ
28 __image_begin = .;
29 *(.image)
30 __image_end = .;
31 CONSTRUCTORS
c0b4e101 32 . = ALIGN(16);
d4d9a553 33 }
d2e850e9
CG
34
35 .appended_dtb : {
36 __appended_dtb = .;
37 /* leave space for appended DTB */
38 . += 0x100000;
39 }
c0b4e101 40
bdbffd9b
WZ
41 _edata = .;
42 /* End of data section */
1b93b3c3 43
d4d9a553 44 /* BSS */
bdbffd9b 45 .bss : {
d4d9a553 46 *(.bss)
d4d9a553 47 }
bdbffd9b
WZ
48 . = ALIGN(16);
49 _end = .;
1b93b3c3 50
d4d9a553 51 /* Sections to be discarded */
bdbffd9b 52 /DISCARD/ : {
d4d9a553
WZ
53 *(.MIPS.options)
54 *(.options)
55 *(.pdr)
56 *(.reginfo)
57 *(.comment)
58 *(.note)
59 }
1b93b3c3 60}