Skip to content

Commit bdbffd9

Browse files
lzufalconralfbaechle
authored andcommitted
MIPS: Clean up arch/mips/boot/compressed/ld.script
- Remove unused symbols: _fdata, _text; only _edata and _end are needed by head.S - Remove unused sections: .sbss, .stab, .gptab.sdata, .gptab.sbss - Change the alignment to 16 bytes to ensure it is greater than any fundamental type of a MIPS compiler. - Clean up comments Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1381/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent c853d94 commit bdbffd9

1 file changed

Lines changed: 17 additions & 34 deletions

File tree

‎arch/mips/boot/compressed/ld.script‎

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,44 @@
22
* ld.script for compressed kernel support of MIPS
33
*
44
* Copyright (C) 2009 Lemote Inc.
5-
* Author: Wu Zhangjin <wuzj@lemote.com>
5+
* Author: Wu Zhangjin <wuzhanjing@gmail.com>
6+
* Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com>
67
*/
78

89
OUTPUT_ARCH(mips)
910
ENTRY(start)
1011
SECTIONS
1112
{
12-
/* . = VMLINUZ_LOAD_ADDRESS */
13-
/* read-only */
14-
_text = .; /* Text and read-only data */
15-
.text : {
16-
_ftext = . ;
13+
/* Text and read-only data */
14+
/* . = VMLINUZ_LOAD_ADDRESS; */
15+
.text : {
1716
*(.text)
1817
*(.rodata)
19-
} = 0
20-
_etext = .; /* End of text section */
18+
}
19+
/* End of text section */
2120

22-
/* writable */
23-
.data : { /* Data */
24-
_fdata = . ;
21+
/* Writable data */
22+
.data : {
2523
*(.data)
26-
/* Put the compressed image here, so bss is on the end. */
24+
/* Put the compressed image here */
2725
__image_begin = .;
2826
*(.image)
2927
__image_end = .;
3028
CONSTRUCTORS
3129
}
32-
.sdata : { *(.sdata) }
33-
. = ALIGN(4);
34-
_edata = .; /* End of data section */
30+
. = ALIGN(16);
31+
_edata = .;
32+
/* End of data section */
3533

3634
/* BSS */
37-
__bss_start = .;
38-
_fbss = .;
39-
.sbss : { *(.sbss) *(.scommon) }
40-
.bss : {
41-
*(.dynbss)
35+
.bss : {
4236
*(.bss)
43-
*(COMMON)
4437
}
45-
. = ALIGN(4);
46-
_end = . ;
47-
48-
/* These are needed for ELF backends which have not yet been converted
49-
* to the new style linker. */
50-
51-
.stab 0 : { *(.stab) }
52-
.stabstr 0 : { *(.stabstr) }
53-
54-
/* These must appear regardless of . */
55-
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
56-
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
38+
. = ALIGN(16);
39+
_end = .;
5740

5841
/* Sections to be discarded */
59-
/DISCARD/ : {
42+
/DISCARD/ : {
6043
*(.MIPS.options)
6144
*(.options)
6245
*(.pdr)

0 commit comments

Comments
 (0)