diff options
author | Chris Zankel <chris@zankel.net> | 2008-02-12 16:14:17 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2008-02-13 20:26:17 -0500 |
commit | 36dffadb7f19671aab58be43c5896ea87d5fb1bf (patch) | |
tree | cd319ff25851048fab09f382a0eded96f112924f /arch/xtensa | |
parent | 6d15d109632ff01e13c26893030e2ed9e6c4e3fd (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')
-rw-r--r-- | arch/xtensa/boot/boot-elf/Makefile | 5 | ||||
-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 | |||
14 | endif | 14 | endif |
15 | 15 | ||
16 | export OBJCOPY_ARGS | 16 | export OBJCOPY_ARGS |
17 | export CPPFLAGS_boot.lds += -P -C | ||
17 | 18 | ||
18 | boot-y := bootstrap.o | 19 | boot-y := bootstrap.o |
19 | 20 | ||
20 | OBJS := $(addprefix $(obj)/,$(boot-y)) | 21 | OBJS := $(addprefix $(obj)/,$(boot-y)) |
21 | 22 | ||
22 | Image: vmlinux $(OBJS) | 23 | Image: 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> | ||
1 | OUTPUT_ARCH(xtensa) | 2 | OUTPUT_ARCH(xtensa) |
2 | ENTRY(_ResetVector) | 3 | ENTRY(_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 | } |