diff options
author | Nicolas Pitre <nico@cam.org> | 2005-10-29 21:44:56 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-29 21:44:56 +0100 |
commit | 37d07b72ef58f2d5ec7701ab75084fbeee0e503e (patch) | |
tree | da42fbad5b8ac6c79a258a46aff5f5d338ac138f /arch/arm/kernel/vmlinux.lds.S | |
parent | f09b99799991c7c3ba441162406247f5df077322 (diff) | |
download | lwn-37d07b72ef58f2d5ec7701ab75084fbeee0e503e.tar.gz lwn-37d07b72ef58f2d5ec7701ab75084fbeee0e503e.zip |
[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.S | 11 |
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 @@ #include <asm-generic/vmlinux.lds.h> #include <linux/config.h> #include <asm/thread_info.h> +#include <asm/memory.h> OUTPUT_ARCH(arm) ENTRY(stext) + #ifndef __ARMEB__ jiffies = jiffies_64; #else jiffies = jiffies_64 + 4; #endif + +#ifdef CONFIG_XIP_KERNEL +#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) +#else +#define TEXTADDR KERNEL_RAM_ADDR +#endif + SECTIONS { . = TEXTADDR; @@ -95,7 +104,7 @@ SECTIONS #ifdef CONFIG_XIP_KERNEL __data_loc = ALIGN(4); /* location in binary */ - . = DATAADDR; + . = KERNEL_RAM_ADDR; #else . = ALIGN(THREAD_SIZE); __data_loc = .; |