aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-10-29 16:44:56 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-29 16:44:56 -0400
commit37d07b72ef58f2d5ec7701ab75084fbeee0e503e (patch)
treeda42fbad5b8ac6c79a258a46aff5f5d338ac138f /arch/arm/kernel/vmlinux.lds.S
parentf09b99799991c7c3ba441162406247f5df077322 (diff)
[ARM] 3061/1: cleanup the XIP link address mess
Patch from Nicolas Pitre Since vmlinux.lds.S is preprocessed, we can use the defines already present in asm/memory.h (allowed by patch #3060) for the XIP kernel link address instead of relying on a duplicated Makefile hardcoded value, and also get rid of its dependency on awk to handle it at the same time. While at it let's clean XIP stuff even further and make things clearer in head.S with a nice code reduction. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/vmlinux.lds.S')
-rw-r--r--arch/arm/kernel/vmlinux.lds.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 0d5db5279c5c..80c8e4c8cefa 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -6,14 +6,23 @@
6#include <asm-generic/vmlinux.lds.h> 6#include <asm-generic/vmlinux.lds.h>
7#include <linux/config.h> 7#include <linux/config.h>
8#include <asm/thread_info.h> 8#include <asm/thread_info.h>
9#include <asm/memory.h>
9 10
10OUTPUT_ARCH(arm) 11OUTPUT_ARCH(arm)
11ENTRY(stext) 12ENTRY(stext)
13
12#ifndef __ARMEB__ 14#ifndef __ARMEB__
13jiffies = jiffies_64; 15jiffies = jiffies_64;
14#else 16#else
15jiffies = jiffies_64 + 4; 17jiffies = jiffies_64 + 4;
16#endif 18#endif
19
20#ifdef CONFIG_XIP_KERNEL
21#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
22#else
23#define TEXTADDR KERNEL_RAM_ADDR
24#endif
25
17SECTIONS 26SECTIONS
18{ 27{
19 . = TEXTADDR; 28 . = TEXTADDR;
@@ -95,7 +104,7 @@ SECTIONS
95 104
96#ifdef CONFIG_XIP_KERNEL 105#ifdef CONFIG_XIP_KERNEL
97 __data_loc = ALIGN(4); /* location in binary */ 106 __data_loc = ALIGN(4); /* location in binary */
98 . = DATAADDR; 107 . = KERNEL_RAM_ADDR;
99#else 108#else
100 . = ALIGN(THREAD_SIZE); 109 . = ALIGN(THREAD_SIZE);
101 __data_loc = .; 110 __data_loc = .;