aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-12 01:41:45 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-12 01:41:45 -0500
commit19f6b8b44e3f633d5d7d1ed68848b1eb89a1e800 (patch)
tree4d2bacbf4a1ae3f3cbbb9c32a0c9d126731b89f3 /arch
parentb0f3ae03aca0f331b851ae94bc066124e7f104df (diff)
sh64: fix up memory offset calculation.
The linker script offsets were broken by the recent 29/32-bit integration, so this fixes it up for sh64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/include/asm/vmlinux.lds.h8
-rw-r--r--arch/sh/kernel/vmlinux.lds.S19
2 files changed, 13 insertions, 14 deletions
diff --git a/arch/sh/include/asm/vmlinux.lds.h b/arch/sh/include/asm/vmlinux.lds.h
index 244ec4ad9a79..d58ad493b3a6 100644
--- a/arch/sh/include/asm/vmlinux.lds.h
+++ b/arch/sh/include/asm/vmlinux.lds.h
@@ -14,4 +14,12 @@
14#define DWARF_EH_FRAME 14#define DWARF_EH_FRAME
15#endif 15#endif
16 16
17#ifdef CONFIG_SUPERH64
18#define EXTRA_TEXT \
19 *(.text64) \
20 *(.text..SHmedia32)
21#else
22#define EXTRA_TEXT
23#endif
24
17#endif /* __ASM_SH_VMLINUX_LDS_H */ 25#endif /* __ASM_SH_VMLINUX_LDS_H */
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index f0bc6b886eed..dcf48915e2ea 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -3,10 +3,12 @@
3 * Written by Niibe Yutaka and Paul Mundt 3 * Written by Niibe Yutaka and Paul Mundt
4 */ 4 */
5#ifdef CONFIG_SUPERH64 5#ifdef CONFIG_SUPERH64
6#define LOAD_OFFSET CONFIG_PAGE_OFFSET 6#define LOAD_OFFSET PAGE_OFFSET
7#define MEMORY_OFFSET __MEMORY_START
7OUTPUT_ARCH(sh:sh5) 8OUTPUT_ARCH(sh:sh5)
8#else 9#else
9#define LOAD_OFFSET 0 10#define LOAD_OFFSET 0
11#define MEMORY_OFFSET 0
10OUTPUT_ARCH(sh) 12OUTPUT_ARCH(sh)
11#endif 13#endif
12 14
@@ -14,16 +16,10 @@ OUTPUT_ARCH(sh)
14#include <asm/cache.h> 16#include <asm/cache.h>
15#include <asm/vmlinux.lds.h> 17#include <asm/vmlinux.lds.h>
16 18
17#if defined(CONFIG_32BIT) && !defined(CONFIG_PMB_LEGACY)
18#define MEMORY_OFFSET 0
19#else
20#define MEMORY_OFFSET (CONFIG_MEMORY_START & 0x1fffffff)
21#endif
22
23ENTRY(_start) 19ENTRY(_start)
24SECTIONS 20SECTIONS
25{ 21{
26 . = CONFIG_PAGE_OFFSET + MEMORY_OFFSET + CONFIG_ZERO_PAGE_OFFSET; 22 . = PAGE_OFFSET + MEMORY_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
27 23
28 _text = .; /* Text and read-only data */ 24 _text = .; /* Text and read-only data */
29 25
@@ -34,12 +30,7 @@ SECTIONS
34 .text : AT(ADDR(.text) - LOAD_OFFSET) { 30 .text : AT(ADDR(.text) - LOAD_OFFSET) {
35 HEAD_TEXT 31 HEAD_TEXT
36 TEXT_TEXT 32 TEXT_TEXT
37 33 EXTRA_TEXT
38#ifdef CONFIG_SUPERH64
39 *(.text64)
40 *(.text..SHmedia32)
41#endif
42
43 SCHED_TEXT 34 SCHED_TEXT
44 LOCK_TEXT 35 LOCK_TEXT
45 KPROBES_TEXT 36 KPROBES_TEXT