diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-02-02 09:31:16 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-02-07 08:30:26 -0500 |
commit | dbee90b7f90df6398f0877cd38dfaa76addb0619 (patch) | |
tree | 27b9a417f94ff8ea4364a5f8f9806909fd85709a /arch | |
parent | fcfd980c833bd5ca1df9ca877b3e968e4da05b24 (diff) |
[MIPS] Fix linker script to work for non-4K page size.
Very much to my surprise Fuxin Zhang reports this is all it takes to get
the kernel to work for page sizes larger than 4kB. This also paves the
way for support for the R6000 and R8000 which don't support 4kB page size.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 25cc856d8e7e..ff699dbb99f7 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/config.h> | 1 | #include <linux/config.h> |
2 | #include <asm/asm-offsets.h> | ||
2 | #include <asm-generic/vmlinux.lds.h> | 3 | #include <asm-generic/vmlinux.lds.h> |
3 | 4 | ||
4 | #undef mips /* CPP really sucks for this job */ | 5 | #undef mips /* CPP really sucks for this job */ |
@@ -64,10 +65,10 @@ SECTIONS | |||
64 | we can shorten the on-disk segment size. */ | 65 | we can shorten the on-disk segment size. */ |
65 | .sdata : { *(.sdata) } | 66 | .sdata : { *(.sdata) } |
66 | 67 | ||
67 | . = ALIGN(4096); | 68 | . = ALIGN(_PAGE_SIZE); |
68 | __nosave_begin = .; | 69 | __nosave_begin = .; |
69 | .data_nosave : { *(.data.nosave) } | 70 | .data_nosave : { *(.data.nosave) } |
70 | . = ALIGN(4096); | 71 | . = ALIGN(_PAGE_SIZE); |
71 | __nosave_end = .; | 72 | __nosave_end = .; |
72 | 73 | ||
73 | . = ALIGN(32); | 74 | . = ALIGN(32); |
@@ -76,7 +77,7 @@ SECTIONS | |||
76 | _edata = .; /* End of data section */ | 77 | _edata = .; /* End of data section */ |
77 | 78 | ||
78 | /* will be freed after init */ | 79 | /* will be freed after init */ |
79 | . = ALIGN(4096); /* Init code and data */ | 80 | . = ALIGN(_PAGE_SIZE); /* Init code and data */ |
80 | __init_begin = .; | 81 | __init_begin = .; |
81 | .init.text : { | 82 | .init.text : { |
82 | _sinittext = .; | 83 | _sinittext = .; |
@@ -105,7 +106,7 @@ SECTIONS | |||
105 | .con_initcall.init : { *(.con_initcall.init) } | 106 | .con_initcall.init : { *(.con_initcall.init) } |
106 | __con_initcall_end = .; | 107 | __con_initcall_end = .; |
107 | SECURITY_INIT | 108 | SECURITY_INIT |
108 | . = ALIGN(4096); | 109 | . = ALIGN(_PAGE_SIZE); |
109 | __initramfs_start = .; | 110 | __initramfs_start = .; |
110 | .init.ramfs : { *(.init.ramfs) } | 111 | .init.ramfs : { *(.init.ramfs) } |
111 | __initramfs_end = .; | 112 | __initramfs_end = .; |
@@ -113,7 +114,7 @@ SECTIONS | |||
113 | __per_cpu_start = .; | 114 | __per_cpu_start = .; |
114 | .data.percpu : { *(.data.percpu) } | 115 | .data.percpu : { *(.data.percpu) } |
115 | __per_cpu_end = .; | 116 | __per_cpu_end = .; |
116 | . = ALIGN(4096); | 117 | . = ALIGN(_PAGE_SIZE); |
117 | __init_end = .; | 118 | __init_end = .; |
118 | /* freed after init ends here */ | 119 | /* freed after init ends here */ |
119 | 120 | ||