aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/boot
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2008-02-12 16:14:17 -0500
committerChris Zankel <chris@zankel.net>2008-02-13 20:26:17 -0500
commit36dffadb7f19671aab58be43c5896ea87d5fb1bf (patch)
treecd319ff25851048fab09f382a0eded96f112924f /arch/xtensa/boot
parent6d15d109632ff01e13c26893030e2ed9e6c4e3fd (diff)
[XTENSA] Use preprocessor to generate the linker script for the ELF boot image
Signed-off-by: Marc Gauthier <marc@tensilica.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/boot')
-rw-r--r--arch/xtensa/boot/boot-elf/Makefile5
-rw-r--r--arch/xtensa/boot/boot-elf/boot.lds.S (renamed from arch/xtensa/boot/boot-elf/boot.ld)3
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile
index 734db7f76583..9cf50ef465c1 100644
--- a/arch/xtensa/boot/boot-elf/Makefile
+++ b/arch/xtensa/boot/boot-elf/Makefile
@@ -14,12 +14,13 @@ OBJCOPY_ARGS := -O elf32-xtensa-le
14endif 14endif
15 15
16export OBJCOPY_ARGS 16export OBJCOPY_ARGS
17export CPPFLAGS_boot.lds += -P -C
17 18
18boot-y := bootstrap.o 19boot-y := bootstrap.o
19 20
20OBJS := $(addprefix $(obj)/,$(boot-y)) 21OBJS := $(addprefix $(obj)/,$(boot-y))
21 22
22Image: vmlinux $(OBJS) 23Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
23 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ 24 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \
24 vmlinux vmlinux.tmp 25 vmlinux vmlinux.tmp
25 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 26 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
@@ -27,7 +28,7 @@ Image: vmlinux $(OBJS)
27 --set-section-flags image=contents,alloc,load,load,data \ 28 --set-section-flags image=contents,alloc,load,load,data \
28 $(OBJS) $@.tmp 29 $(OBJS) $@.tmp
29 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 30 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
30 -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \ 31 -T arch/$(ARCH)/boot/boot-elf/boot.lds \
31 -o arch/$(ARCH)/boot/$@.elf $@.tmp 32 -o arch/$(ARCH)/boot/$@.elf $@.tmp
32 rm -f $@.tmp vmlinux.tmp 33 rm -f $@.tmp vmlinux.tmp
33 34
diff --git a/arch/xtensa/boot/boot-elf/boot.ld b/arch/xtensa/boot/boot-elf/boot.lds.S
index e33855c167bf..849dfcafd518 100644
--- a/arch/xtensa/boot/boot-elf/boot.ld
+++ b/arch/xtensa/boot/boot-elf/boot.lds.S
@@ -1,3 +1,4 @@
1#include <asm/variant/core.h>
1OUTPUT_ARCH(xtensa) 2OUTPUT_ARCH(xtensa)
2ENTRY(_ResetVector) 3ENTRY(_ResetVector)
3 4
@@ -62,7 +63,7 @@ SECTIONS
62 _end = .; 63 _end = .;
63 _param_start = .; 64 _param_start = .;
64 65
65 .ResetVector.text 0xfe000020 : 66 .ResetVector.text XCHAL_RESET_VECTOR_VADDR :
66 { 67 {
67 *(.ResetVector.text) 68 *(.ResetVector.text)
68 } 69 }