Commit bdbffd9b8d565fa7e011def532d3770be8d8091b
Committed by
Ralf Baechle
1 parent
c853d945d3
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 17 additions and 34 deletions Side-by-side Diff
arch/mips/boot/compressed/ld.script
... | ... | @@ -2,61 +2,44 @@ |
2 | 2 | * ld.script for compressed kernel support of MIPS |
3 | 3 | * |
4 | 4 | * 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> | |
6 | 7 | */ |
7 | 8 | |
8 | 9 | OUTPUT_ARCH(mips) |
9 | 10 | ENTRY(start) |
10 | 11 | SECTIONS |
11 | 12 | { |
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 : { | |
17 | 16 | *(.text) |
18 | 17 | *(.rodata) |
19 | - } = 0 | |
20 | - _etext = .; /* End of text section */ | |
18 | + } | |
19 | + /* End of text section */ | |
21 | 20 | |
22 | - /* writable */ | |
23 | - .data : { /* Data */ | |
24 | - _fdata = . ; | |
21 | + /* Writable data */ | |
22 | + .data : { | |
25 | 23 | *(.data) |
26 | - /* Put the compressed image here, so bss is on the end. */ | |
24 | + /* Put the compressed image here */ | |
27 | 25 | __image_begin = .; |
28 | 26 | *(.image) |
29 | 27 | __image_end = .; |
30 | 28 | CONSTRUCTORS |
31 | 29 | } |
32 | - .sdata : { *(.sdata) } | |
33 | - . = ALIGN(4); | |
34 | - _edata = .; /* End of data section */ | |
30 | + . = ALIGN(16); | |
31 | + _edata = .; | |
32 | + /* End of data section */ | |
35 | 33 | |
36 | 34 | /* BSS */ |
37 | - __bss_start = .; | |
38 | - _fbss = .; | |
39 | - .sbss : { *(.sbss) *(.scommon) } | |
40 | - .bss : { | |
41 | - *(.dynbss) | |
35 | + .bss : { | |
42 | 36 | *(.bss) |
43 | - *(COMMON) | |
44 | 37 | } |
45 | - . = ALIGN(4); | |
46 | - _end = . ; | |
38 | + . = ALIGN(16); | |
39 | + _end = .; | |
47 | 40 | |
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) } | |
57 | - | |
58 | 41 | /* Sections to be discarded */ |
59 | - /DISCARD/ : { | |
42 | + /DISCARD/ : { | |
60 | 43 | *(.MIPS.options) |
61 | 44 | *(.options) |
62 | 45 | *(.pdr) |