diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-12 17:01:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-13 11:02:22 -0400 |
commit | a7dfa9403bf3b03899d5ef5d10b0c5c3f74b0682 (patch) | |
tree | a65021eecb15793d453c1ed1258759312f17e3cb /arch/um | |
parent | 6d0742426c9adc7465ef5c62a99a1d3e9696ea19 (diff) |
uml: use PAGE_SIZE in linker scripts
This patch includes page.h header into linker scripts that allow us to
use PAGE_SIZE macro instead of numeric constant.
To be able to include page.h into linker scripts page.h is needed for
some modification - i.e. we need to use __ASSEMBLY__ and _AC macro
[jdike@linux.intel.com - fixed conflict with as-layout.h]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/include/as-layout.h | 14 | ||||
-rw-r--r-- | arch/um/kernel/dyn.lds.S | 7 | ||||
-rw-r--r-- | arch/um/kernel/uml.lds.S | 7 |
3 files changed, 15 insertions, 13 deletions
diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h index cac542d8ff70..58e852dfb0ce 100644 --- a/arch/um/include/as-layout.h +++ b/arch/um/include/as-layout.h | |||
@@ -23,16 +23,16 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifdef __ASSEMBLY__ | 25 | #ifdef __ASSEMBLY__ |
26 | #define _AC(X, Y) (Y) | 26 | #define _UML_AC(X, Y) (Y) |
27 | #else | 27 | #else |
28 | #define __AC(X, Y) (X (Y)) | 28 | #define __UML_AC(X, Y) (X(Y)) |
29 | #define _AC(X, Y) __AC(X, Y) | 29 | #define _UML_AC(X, Y) __UML_AC(X, Y) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define STUB_START _AC(, 0x100000) | 32 | #define STUB_START _UML_AC(, 0x100000) |
33 | #define STUB_CODE _AC((unsigned long), STUB_START) | 33 | #define STUB_CODE _UML_AC((unsigned long), STUB_START) |
34 | #define STUB_DATA _AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE) | 34 | #define STUB_DATA _UML_AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE) |
35 | #define STUB_END _AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE) | 35 | #define STUB_END _UML_AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE) |
36 | 36 | ||
37 | #ifndef __ASSEMBLY__ | 37 | #ifndef __ASSEMBLY__ |
38 | 38 | ||
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index 26090b7f323e..9975e1ab44fb 100644 --- a/arch/um/kernel/dyn.lds.S +++ b/arch/um/kernel/dyn.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | 1 | #include <asm-generic/vmlinux.lds.h> |
2 | #include <asm/page.h> | ||
2 | 3 | ||
3 | OUTPUT_FORMAT(ELF_FORMAT) | 4 | OUTPUT_FORMAT(ELF_FORMAT) |
4 | OUTPUT_ARCH(ELF_ARCH) | 5 | OUTPUT_ARCH(ELF_ARCH) |
@@ -21,7 +22,7 @@ SECTIONS | |||
21 | _einittext = .; | 22 | _einittext = .; |
22 | } | 23 | } |
23 | 24 | ||
24 | . = ALIGN(4096); | 25 | . = ALIGN(PAGE_SIZE); |
25 | 26 | ||
26 | /* Read-only sections, merged into text segment: */ | 27 | /* Read-only sections, merged into text segment: */ |
27 | .hash : { *(.hash) } | 28 | .hash : { *(.hash) } |
@@ -68,9 +69,9 @@ SECTIONS | |||
68 | /* .gnu.warning sections are handled specially by elf32.em. */ | 69 | /* .gnu.warning sections are handled specially by elf32.em. */ |
69 | *(.gnu.warning) | 70 | *(.gnu.warning) |
70 | 71 | ||
71 | . = ALIGN(4096); | 72 | . = ALIGN(PAGE_SIZE); |
72 | } =0x90909090 | 73 | } =0x90909090 |
73 | . = ALIGN(4096); | 74 | . = ALIGN(PAGE_SIZE); |
74 | .syscall_stub : { | 75 | .syscall_stub : { |
75 | __syscall_stub_start = .; | 76 | __syscall_stub_start = .; |
76 | *(.__syscall_stub*) | 77 | *(.__syscall_stub*) |
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index 5828c1d54505..11b835248b86 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | 1 | #include <asm-generic/vmlinux.lds.h> |
2 | #include <asm/page.h> | ||
2 | 3 | ||
3 | OUTPUT_FORMAT(ELF_FORMAT) | 4 | OUTPUT_FORMAT(ELF_FORMAT) |
4 | OUTPUT_ARCH(ELF_ARCH) | 5 | OUTPUT_ARCH(ELF_ARCH) |
@@ -26,7 +27,7 @@ SECTIONS | |||
26 | INIT_TEXT | 27 | INIT_TEXT |
27 | _einittext = .; | 28 | _einittext = .; |
28 | } | 29 | } |
29 | . = ALIGN(4096); | 30 | . = ALIGN(PAGE_SIZE); |
30 | 31 | ||
31 | .text : | 32 | .text : |
32 | { | 33 | { |
@@ -39,7 +40,7 @@ SECTIONS | |||
39 | *(.gnu.linkonce.t*) | 40 | *(.gnu.linkonce.t*) |
40 | } | 41 | } |
41 | 42 | ||
42 | . = ALIGN(4096); | 43 | . = ALIGN(PAGE_SIZE); |
43 | .syscall_stub : { | 44 | .syscall_stub : { |
44 | __syscall_stub_start = .; | 45 | __syscall_stub_start = .; |
45 | *(.__syscall_stub*) | 46 | *(.__syscall_stub*) |
@@ -79,7 +80,7 @@ SECTIONS | |||
79 | .sdata : { *(.sdata) } | 80 | .sdata : { *(.sdata) } |
80 | _edata = .; | 81 | _edata = .; |
81 | PROVIDE (edata = .); | 82 | PROVIDE (edata = .); |
82 | . = ALIGN(0x1000); | 83 | . = ALIGN(PAGE_SIZE); |
83 | .sbss : | 84 | .sbss : |
84 | { | 85 | { |
85 | __bss_start = .; | 86 | __bss_start = .; |