aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S11
-rw-r--r--include/asm-generic/vmlinux.lds.h10
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
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) }
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) { \