diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 15:33:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 15:33:16 -0400 |
commit | 54ca4123363f388ab724fc66da92b87dc05395c3 (patch) | |
tree | 8ff6a020410b1d08b4a765952e6cb62e3ae1a11d | |
parent | 51d7cfc670e4c09e296af101326a6270060e72e7 (diff) | |
parent | 4096b46f01a362fe2cc83f6be25cc7be6bce2ab7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix:
sparc64: fix alignment bug in linker definition script
-rw-r--r-- | arch/sparc64/kernel/vmlinux.lds.S | 11 | ||||
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 10 |
2 files changed, 13 insertions, 8 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 | ||
5 | OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") | 6 | OUTPUT_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) } |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 8307b1bb337a..84155eb67f1d 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -14,8 +14,8 @@ | |||
14 | *(.data) \ | 14 | *(.data) \ |
15 | *(.data.init.refok) | 15 | *(.data.init.refok) |
16 | 16 | ||
17 | #define RODATA \ | 17 | #define RO_DATA(align) \ |
18 | . = ALIGN(4096); \ | 18 | . = ALIGN((align)); \ |
19 | .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ | 19 | .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ |
20 | VMLINUX_SYMBOL(__start_rodata) = .; \ | 20 | VMLINUX_SYMBOL(__start_rodata) = .; \ |
21 | *(.rodata) *(.rodata.*) \ | 21 | *(.rodata) *(.rodata.*) \ |
@@ -135,7 +135,11 @@ | |||
135 | VMLINUX_SYMBOL(__end_rodata) = .; \ | 135 | VMLINUX_SYMBOL(__end_rodata) = .; \ |
136 | } \ | 136 | } \ |
137 | \ | 137 | \ |
138 | . = ALIGN(4096); | 138 | . = ALIGN((align)); |
139 | |||
140 | /* RODATA provided for backward compatibility. | ||
141 | * All archs are supposed to use RO_DATA() */ | ||
142 | #define RODATA RO_DATA(4096) | ||
139 | 143 | ||
140 | #define SECURITY_INIT \ | 144 | #define SECURITY_INIT \ |
141 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ | 145 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ |