summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-12 07:41:45 +0100
committerPaul Mundt <lethal@linux-sh.org>2010-02-12 07:41:45 +0100
commit19f6b8b44e3f633d5d7d1ed68848b1eb89a1e800 (patch)
tree4d2bacbf4a1ae3f3cbbb9c32a0c9d126731b89f3 /arch/sh/kernel
parentsh: Isolate uncached mapping support. (diff)
downloadlinux-19f6b8b44e3f633d5d7d1ed68848b1eb89a1e800.tar.xz
linux-19f6b8b44e3f633d5d7d1ed68848b1eb89a1e800.zip
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/sh/kernel')
-rw-r--r--arch/sh/kernel/vmlinux.lds.S19
1 files changed, 5 insertions, 14 deletions
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 @@
* Written by Niibe Yutaka and Paul Mundt
*/
#ifdef CONFIG_SUPERH64
-#define LOAD_OFFSET CONFIG_PAGE_OFFSET
+#define LOAD_OFFSET PAGE_OFFSET
+#define MEMORY_OFFSET __MEMORY_START
OUTPUT_ARCH(sh:sh5)
#else
#define LOAD_OFFSET 0
+#define MEMORY_OFFSET 0
OUTPUT_ARCH(sh)
#endif
@@ -14,16 +16,10 @@ OUTPUT_ARCH(sh)
#include <asm/cache.h>
#include <asm/vmlinux.lds.h>
-#if defined(CONFIG_32BIT) && !defined(CONFIG_PMB_LEGACY)
-#define MEMORY_OFFSET 0
-#else
-#define MEMORY_OFFSET (CONFIG_MEMORY_START & 0x1fffffff)
-#endif
-
ENTRY(_start)
SECTIONS
{
- . = CONFIG_PAGE_OFFSET + MEMORY_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
+ . = PAGE_OFFSET + MEMORY_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
_text = .; /* Text and read-only data */
@@ -34,12 +30,7 @@ SECTIONS
.text : AT(ADDR(.text) - LOAD_OFFSET) {
HEAD_TEXT
TEXT_TEXT
-
-#ifdef CONFIG_SUPERH64
- *(.text64)
- *(.text..SHmedia32)
-#endif
-
+ EXTRA_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT