aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-05-29 15:29:00 -0400
committerSam Ravnborg <sam@ravnborg.org>2007-05-29 15:29:00 -0400
commit4096b46f01a362fe2cc83f6be25cc7be6bce2ab7 (patch)
tree7738ca7a7962dc88cc5b9e6dc3b789e73504a7c8 /arch
parentc420bc9f09a0926b708c3edb27eacba434a4f4ba (diff)
sparc64: fix alignment bug in linker definition script
The RO_DATA section were hardcoded to a specific alignment in include/asm-generic/vmlinux.h. But for sparc64 this did not match the PAGE_SIZE. Introduce a new section definition named: RO_DATA that takes actual alignment as parameter. RODATA are provided for backward compatibility. On top of this avoid hardcoding alignment for sparc64 in reset of the script Fix is build-tested on sparc64 + x86_64. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
index fb648de18a8d..3ad10f3027e4 100644
--- a/arch/sparc64/kernel/vmlinux.lds.S
+++ b/arch/sparc64/kernel/vmlinux.lds.S
@@ -1,5 +1,6 @@
1/* ld script to make UltraLinux kernel */ 1/* ld script to make UltraLinux kernel */
2 2
3#include <asm/page.h>
3#include <asm-generic/vmlinux.lds.h> 4#include <asm-generic/vmlinux.lds.h>
4 5
5OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") 6OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
@@ -23,7 +24,7 @@ SECTIONS
23 _etext = .; 24 _etext = .;
24 PROVIDE (etext = .); 25 PROVIDE (etext = .);
25 26
26 RODATA 27 RO_DATA(PAGE_SIZE)
27 28
28 .data : 29 .data :
29 { 30 {
@@ -44,7 +45,7 @@ SECTIONS
44 __ex_table : { *(__ex_table) } 45 __ex_table : { *(__ex_table) }
45 __stop___ex_table = .; 46 __stop___ex_table = .;
46 47
47 . = ALIGN(8192); 48 . = ALIGN(PAGE_SIZE);
48 __init_begin = .; 49 __init_begin = .;
49 .init.text : { 50 .init.text : {
50 _sinittext = .; 51 _sinittext = .;
@@ -83,17 +84,17 @@ SECTIONS
83 __sun4v_2insn_patch_end = .; 84 __sun4v_2insn_patch_end = .;
84 85
85#ifdef CONFIG_BLK_DEV_INITRD 86#ifdef CONFIG_BLK_DEV_INITRD
86 . = ALIGN(8192); 87 . = ALIGN(PAGE_SIZE);
87 __initramfs_start = .; 88 __initramfs_start = .;
88 .init.ramfs : { *(.init.ramfs) } 89 .init.ramfs : { *(.init.ramfs) }
89 __initramfs_end = .; 90 __initramfs_end = .;
90#endif 91#endif
91 92
92 . = ALIGN(8192); 93 . = ALIGN(PAGE_SIZE);
93 __per_cpu_start = .; 94 __per_cpu_start = .;
94 .data.percpu : { *(.data.percpu) } 95 .data.percpu : { *(.data.percpu) }
95 __per_cpu_end = .; 96 __per_cpu_end = .;
96 . = ALIGN(8192); 97 . = ALIGN(PAGE_SIZE);
97 __init_end = .; 98 __init_end = .;
98 __bss_start = .; 99 __bss_start = .;
99 .sbss : { *(.sbss) *(.scommon) } 100 .sbss : { *(.sbss) *(.scommon) }