diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-11-30 00:44:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 12:17:11 -0500 |
commit | 1b1fbbcaad56ede1442e7074bd935a2c98b99596 (patch) | |
tree | 5e6bc6d15906d2f32344386fb4078e40778a74d8 /arch/sparc64/kernel | |
parent | 63ef34827c1f5ac838e869cc3ecc2d9cfebae152 (diff) |
sparc,sparc64: prepare vmlinux.lds.S for unification
This patch makes the two vmlinux.lds.S files identical
and serve as documentation for the changes in each file.
This mainly add stuffs to sparc32 that is otherwise only
used by sparc64 and thus it should have no effect.
Build tested only.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/vmlinux.lds.S | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S index 01f809617e5e..4bfbeffb7320 100644 --- a/arch/sparc64/kernel/vmlinux.lds.S +++ b/arch/sparc64/kernel/vmlinux.lds.S | |||
@@ -1,19 +1,45 @@ | |||
1 | /* ld script to make UltraLinux kernel */ | 1 | /* ld script for sparc32/sparc64 kernel */ |
2 | 2 | ||
3 | #include <asm/page.h> | ||
4 | #include <asm-generic/vmlinux.lds.h> | 3 | #include <asm-generic/vmlinux.lds.h> |
4 | #include <asm/page.h> | ||
5 | |||
6 | #ifdef CONFIG_SPARC32 | ||
7 | #define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS | ||
8 | #define TEXTSTART 0xf0004000 | ||
9 | |||
10 | #define SMP_CACHE_BYTES_SHIFT 5 | ||
11 | |||
12 | #else | ||
13 | #define SMP_CACHE_BYTES_SHIFT 6 | ||
14 | #define INITIAL_ADDRESS 0x4000 | ||
15 | #define TEXTSTART 0x0000000000404000 | ||
16 | |||
17 | #endif | ||
18 | |||
19 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) | ||
5 | 20 | ||
21 | #ifdef CONFIG_SPARC32 | ||
22 | OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") | ||
23 | OUTPUT_ARCH(sparc) | ||
24 | ENTRY(_start) | ||
25 | jiffies = jiffies_64 + 4; | ||
26 | #else | ||
27 | /* sparc64 */ | ||
6 | OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") | 28 | OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") |
7 | OUTPUT_ARCH(sparc:v9a) | 29 | OUTPUT_ARCH(sparc:v9a) |
8 | ENTRY(_start) | 30 | ENTRY(_start) |
9 | |||
10 | jiffies = jiffies_64; | 31 | jiffies = jiffies_64; |
32 | #endif | ||
33 | |||
11 | SECTIONS | 34 | SECTIONS |
12 | { | 35 | { |
36 | /* swapper_low_pmd_dir is sparc64 only */ | ||
13 | swapper_low_pmd_dir = 0x0000000000402000; | 37 | swapper_low_pmd_dir = 0x0000000000402000; |
14 | . = 0x4000; | 38 | . = INITIAL_ADDRESS; |
15 | .text 0x0000000000404000 : { | 39 | .text TEXTSTART : |
40 | { | ||
16 | _text = .; | 41 | _text = .; |
42 | *(.text.head) | ||
17 | TEXT_TEXT | 43 | TEXT_TEXT |
18 | SCHED_TEXT | 44 | SCHED_TEXT |
19 | LOCK_TEXT | 45 | LOCK_TEXT |
@@ -24,25 +50,27 @@ SECTIONS | |||
24 | PROVIDE (etext = .); | 50 | PROVIDE (etext = .); |
25 | 51 | ||
26 | RO_DATA(PAGE_SIZE) | 52 | RO_DATA(PAGE_SIZE) |
27 | .data : { | 53 | .data : { |
28 | DATA_DATA | 54 | DATA_DATA |
29 | CONSTRUCTORS | 55 | CONSTRUCTORS |
30 | } | 56 | } |
31 | .data1 : { | 57 | .data1 : { |
32 | *(.data1) | 58 | *(.data1) |
33 | } | 59 | } |
34 | . = ALIGN(64); | 60 | . = ALIGN(SMP_CACHE_BYTES); |
35 | .data.cacheline_aligned : { | 61 | .data.cacheline_aligned : { |
36 | *(.data.cacheline_aligned) | 62 | *(.data.cacheline_aligned) |
37 | } | 63 | } |
38 | . = ALIGN(64); | 64 | . = ALIGN(SMP_CACHE_BYTES); |
39 | .data.read_mostly : { | 65 | .data.read_mostly : { |
40 | *(.data.read_mostly) | 66 | *(.data.read_mostly) |
41 | } | 67 | } |
42 | _edata = .; | 68 | _edata = .; |
43 | PROVIDE (edata = .); | 69 | PROVIDE (edata = .); |
44 | .fixup : { | 70 | .fixup : { |
71 | __start___fixup = .; | ||
45 | *(.fixup) | 72 | *(.fixup) |
73 | __stop___fixup = .; | ||
46 | } | 74 | } |
47 | . = ALIGN(16); | 75 | . = ALIGN(16); |
48 | __ex_table : { | 76 | __ex_table : { |
@@ -59,6 +87,7 @@ SECTIONS | |||
59 | INIT_TEXT | 87 | INIT_TEXT |
60 | _einittext = .; | 88 | _einittext = .; |
61 | } | 89 | } |
90 | __init_text_end = .; | ||
62 | .init.data : { | 91 | .init.data : { |
63 | INIT_DATA | 92 | INIT_DATA |
64 | } | 93 | } |