diff options
Diffstat (limited to 'arch/xtensa/boot/boot-elf/Makefile')
-rw-r--r-- | arch/xtensa/boot/boot-elf/Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile index 734db7f76583..08e8814f8c71 100644 --- a/arch/xtensa/boot/boot-elf/Makefile +++ b/arch/xtensa/boot/boot-elf/Makefile | |||
@@ -14,25 +14,26 @@ 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 .note.gnu.build-id -O binary \ |
24 | vmlinux vmlinux.tmp | 25 | vmlinux vmlinux.tmp |
25 | $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | 26 | $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ |
26 | --add-section image=vmlinux.tmp \ | 27 | --add-section image=vmlinux.tmp \ |
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 | ||
34 | Image.initrd: vmlinux $(OBJS) | 35 | Image.initrd: vmlinux $(OBJS) |
35 | $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ | 36 | $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ |
36 | --add-section .initrd=arch/$(ARCH)/boot/ramdisk \ | 37 | --add-section .initrd=arch/$(ARCH)/boot/ramdisk \ |
37 | --set-section-flags .initrd=contents,alloc,load,load,data \ | 38 | --set-section-flags .initrd=contents,alloc,load,load,data \ |
38 | vmlinux vmlinux.tmp | 39 | vmlinux vmlinux.tmp |