aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHirokazu Takata <takata@linux-m32r.org>2007-02-10 04:43:39 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:20 -0500
commit3d60f849341ac00e3dc47a3af94aaf9ba46d00fb (patch)
tree061694cbba9829a9331a263179698b8cc6b2f6d8
parent4aa3b3ccfc6abda052a1bbd9cf018d51c1689836 (diff)
[PATCH] m32r: fix kernel entry address of vmlinux
This patch fixes the kernel entry point address of vmlinux. The m32r kernel entry address is 0x08002000 (physical). But, so far, the ENTRY point written in vmlinux.lds.S was not point the correct kernel entry address. (before fix) $ objdump -x vmlinux vmlinux: file format elf32-m32r-linux vmlinux architecture: m32r2, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x88002090 /* NG */ : Sections: Idx Name Size VMA LMA File off Algn 0 .empty_zero_page 00001000 88001000 88001000 00001000 2**12 CONTENTS, ALLOC, LOAD, DATA 1 .boot 0000008c 88002000 88002000 00002000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .text 001ab694 88002090 88002090 00002090 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE : (after fix) $ objdump -x vmlinux vmlinux: file format elf32-m32r-linux vmlinux architecture: m32r2, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x08002000 /* OK */ : This fix also remedies the following GDB error message (of gdb-6.4 or after) at the first operation of kernel debugging: "Previous frame identical to this frame (corrupt stack?)". Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/m32r/Makefile2
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S5
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile
index f219c47d334f..cdf63b210c53 100644
--- a/arch/m32r/Makefile
+++ b/arch/m32r/Makefile
@@ -7,7 +7,7 @@
7 7
8LDFLAGS := 8LDFLAGS :=
9OBJCOPYFLAGS := -O binary -R .note -R .comment -S 9OBJCOPYFLAGS := -O binary -R .note -R .comment -S
10LDFLAGS_vmlinux := -e startup_32 10LDFLAGS_vmlinux :=
11 11
12CFLAGS += -pipe -fno-schedule-insns 12CFLAGS += -pipe -fno-schedule-insns
13CFLAGS_KERNEL += -mmodel=medium 13CFLAGS_KERNEL += -mmodel=medium
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 358b9cee2c65..c497a2fc88ed 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -6,12 +6,15 @@
6#include <asm/page.h> 6#include <asm/page.h>
7 7
8OUTPUT_ARCH(m32r) 8OUTPUT_ARCH(m32r)
9ENTRY(startup_32)
10#if defined(__LITTLE_ENDIAN__) 9#if defined(__LITTLE_ENDIAN__)
11 jiffies = jiffies_64; 10 jiffies = jiffies_64;
12#else 11#else
13 jiffies = jiffies_64 + 4; 12 jiffies = jiffies_64 + 4;
14#endif 13#endif
14
15kernel_entry = boot - 0x80000000;
16ENTRY(kernel_entry)
17
15SECTIONS 18SECTIONS
16{ 19{
17 . = CONFIG_MEMORY_START + __PAGE_OFFSET; 20 . = CONFIG_MEMORY_START + __PAGE_OFFSET;