diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-06-16 03:52:19 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 08:26:32 -0400 |
commit | bdbffd9b8d565fa7e011def532d3770be8d8091b (patch) | |
tree | 2a2fd98212559de86ec44dc6c7baa08f5a438f85 /arch/mips | |
parent | c853d945d3e0cadf60da03106f7d9bbf1346a518 (diff) |
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>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/boot/compressed/ld.script | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/arch/mips/boot/compressed/ld.script b/arch/mips/boot/compressed/ld.script index 613a35b02f50..8e6b07ca2f5e 100644 --- a/arch/mips/boot/compressed/ld.script +++ b/arch/mips/boot/compressed/ld.script | |||
@@ -2,61 +2,44 @@ | |||
2 | * ld.script for compressed kernel support of MIPS | 2 | * ld.script for compressed kernel support of MIPS |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Lemote Inc. | 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 | OUTPUT_ARCH(mips) | 9 | OUTPUT_ARCH(mips) |
9 | ENTRY(start) | 10 | ENTRY(start) |
10 | SECTIONS | 11 | SECTIONS |
11 | { | 12 | { |
12 | /* . = VMLINUZ_LOAD_ADDRESS */ | 13 | /* Text and read-only data */ |
13 | /* read-only */ | 14 | /* . = VMLINUZ_LOAD_ADDRESS; */ |
14 | _text = .; /* Text and read-only data */ | 15 | .text : { |
15 | .text : { | ||
16 | _ftext = . ; | ||
17 | *(.text) | 16 | *(.text) |
18 | *(.rodata) | 17 | *(.rodata) |
19 | } = 0 | 18 | } |
20 | _etext = .; /* End of text section */ | 19 | /* End of text section */ |
21 | 20 | ||
22 | /* writable */ | 21 | /* Writable data */ |
23 | .data : { /* Data */ | 22 | .data : { |
24 | _fdata = . ; | ||
25 | *(.data) | 23 | *(.data) |
26 | /* Put the compressed image here, so bss is on the end. */ | 24 | /* Put the compressed image here */ |
27 | __image_begin = .; | 25 | __image_begin = .; |
28 | *(.image) | 26 | *(.image) |
29 | __image_end = .; | 27 | __image_end = .; |
30 | CONSTRUCTORS | 28 | CONSTRUCTORS |
31 | } | 29 | } |
32 | .sdata : { *(.sdata) } | 30 | . = ALIGN(16); |
33 | . = ALIGN(4); | 31 | _edata = .; |
34 | _edata = .; /* End of data section */ | 32 | /* End of data section */ |
35 | 33 | ||
36 | /* BSS */ | 34 | /* BSS */ |
37 | __bss_start = .; | 35 | .bss : { |
38 | _fbss = .; | ||
39 | .sbss : { *(.sbss) *(.scommon) } | ||
40 | .bss : { | ||
41 | *(.dynbss) | ||
42 | *(.bss) | 36 | *(.bss) |
43 | *(COMMON) | ||
44 | } | 37 | } |
45 | . = ALIGN(4); | 38 | . = ALIGN(16); |
46 | _end = . ; | 39 | _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) } | ||
57 | 40 | ||
58 | /* Sections to be discarded */ | 41 | /* Sections to be discarded */ |
59 | /DISCARD/ : { | 42 | /DISCARD/ : { |
60 | *(.MIPS.options) | 43 | *(.MIPS.options) |
61 | *(.options) | 44 | *(.options) |
62 | *(.pdr) | 45 | *(.pdr) |