aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-04-29 03:47:19 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-29 04:20:30 -0400
commitafb8095a7eab32e5760613fa73d2f80a39cc45bf (patch)
tree10f8c58f380a907357f99cf612a0cf2463052de8 /arch/x86
parent17ce265d6a1789eae5eb739a3bb7fcffdb3e87c5 (diff)
x86, vmlinux.lds: unify PHDRS
PHDRS are not equal for the two - so use ifdefs to cover up for that. On the assumption that they may become equal the ifdef is inside the PHDRS definiton. [ Impact: cleanup ] Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Tim Abbott <tabbott@MIT.EDU> Cc: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <1240991249-27117-3-git-send-email-sam@ravnborg.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/vmlinux.lds.S13
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S5
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S11
3 files changed, 13 insertions, 16 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index d113642c1345..1a1b303a4272 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -40,6 +40,19 @@ ENTRY(phys_startup_64)
40jiffies_64 = jiffies; 40jiffies_64 = jiffies;
41#endif 41#endif
42 42
43PHDRS {
44 text PT_LOAD FLAGS(5); /* R_E */
45 data PT_LOAD FLAGS(7); /* RWE */
46#ifdef CONFIG_X86_64
47 user PT_LOAD FLAGS(7); /* RWE */
48 data.init PT_LOAD FLAGS(7); /* RWE */
49#ifdef CONFIG_SMP
50 percpu PT_LOAD FLAGS(7); /* RWE */
51#endif
52 data.init2 PT_LOAD FLAGS(7); /* RWE */
53#endif
54 note PT_NOTE FLAGS(0); /* ___ */
55}
43 56
44#ifdef CONFIG_X86_32 57#ifdef CONFIG_X86_32
45# include "vmlinux_32.lds.S" 58# include "vmlinux_32.lds.S"
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 4c985fcd9ab4..4fd40dc50172 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -1,8 +1,3 @@
1PHDRS {
2 text PT_LOAD FLAGS(5); /* R_E */
3 data PT_LOAD FLAGS(7); /* RWE */
4 note PT_NOTE FLAGS(0); /* ___ */
5}
6SECTIONS 1SECTIONS
7{ 2{
8 . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR; 3 . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 7f1cc3d5fef2..6e7cbee0e87f 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -1,14 +1,3 @@
1PHDRS {
2 text PT_LOAD FLAGS(5); /* R_E */
3 data PT_LOAD FLAGS(7); /* RWE */
4 user PT_LOAD FLAGS(7); /* RWE */
5 data.init PT_LOAD FLAGS(7); /* RWE */
6#ifdef CONFIG_SMP
7 percpu PT_LOAD FLAGS(7); /* RWE */
8#endif
9 data.init2 PT_LOAD FLAGS(7); /* RWE */
10 note PT_NOTE FLAGS(0); /* ___ */
11}
12SECTIONS 1SECTIONS
13{ 2{
14 . = __START_KERNEL; 3 . = __START_KERNEL;