Commit bdd362ff authored by Bob Wilson's avatar Bob Wilson Committed by Chris Zankel

[XTENSA] Fix makefile to work with binutils-2.18.

When building with binutils-2.18, vmlinux includes .note.gnu.build-id
sections that need to be stripped out when building the binary image.
The old .xt.insn sections haven't been used for a long time, so don't
bother stripping them.
Signed-off-by: default avatarBob Wilson <bob.wilson@acm.org>
Signed-off-by: default avatarChris Zankel <chris@zankel.net>
parent e1088430
...@@ -21,7 +21,7 @@ boot-y := bootstrap.o ...@@ -21,7 +21,7 @@ boot-y := bootstrap.o
OBJS := $(addprefix $(obj)/,$(boot-y)) OBJS := $(addprefix $(obj)/,$(boot-y))
Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
vmlinux vmlinux.tmp vmlinux vmlinux.tmp
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.tmp \ --add-section image=vmlinux.tmp \
...@@ -33,7 +33,7 @@ Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds ...@@ -33,7 +33,7 @@ Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
rm -f $@.tmp vmlinux.tmp rm -f $@.tmp vmlinux.tmp
Image.initrd: vmlinux $(OBJS) Image.initrd: vmlinux $(OBJS)
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
--add-section .initrd=arch/$(ARCH)/boot/ramdisk \ --add-section .initrd=arch/$(ARCH)/boot/ramdisk \
--set-section-flags .initrd=contents,alloc,load,load,data \ --set-section-flags .initrd=contents,alloc,load,load,data \
vmlinux vmlinux.tmp vmlinux vmlinux.tmp
......
...@@ -22,7 +22,7 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a ...@@ -22,7 +22,7 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
zImage: vmlinux $(OBJS) $(LIBS) zImage: vmlinux $(OBJS) $(LIBS)
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
vmlinux vmlinux.tmp vmlinux vmlinux.tmp
gzip -vf9 vmlinux.tmp gzip -vf9 vmlinux.tmp
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment