diff options
Diffstat (limited to 'arch/mips/boot/compressed/Makefile')
-rw-r--r-- | arch/mips/boot/compressed/Makefile | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index e27f40bbd4e5..671d3448fad4 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
@@ -56,7 +56,7 @@ $(obj)/piggy.o: $(obj)/vmlinux.$(suffix_y) $(obj)/dummy.o | |||
56 | LDFLAGS_vmlinuz := $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T | 56 | LDFLAGS_vmlinuz := $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T |
57 | vmlinuz: $(src)/ld.script $(obj-y) $(obj)/piggy.o | 57 | vmlinuz: $(src)/ld.script $(obj-y) $(obj)/piggy.o |
58 | $(call if_changed,ld) | 58 | $(call if_changed,ld) |
59 | $(Q)$(OBJCOPY) $(OBJCOPYFLAGS) -R .comment -R .stab -R .stabstr -R .initrd -R .sysmap $@ | 59 | $(Q)$(OBJCOPY) $(OBJCOPYFLAGS) $@ |
60 | 60 | ||
61 | # | 61 | # |
62 | # Some DECstations need all possible sections of an ECOFF executable | 62 | # Some DECstations need all possible sections of an ECOFF executable |
@@ -84,14 +84,11 @@ vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ) | |||
84 | $(obj)/../elf2ecoff: $(src)/../elf2ecoff.c | 84 | $(obj)/../elf2ecoff: $(src)/../elf2ecoff.c |
85 | $(Q)$(HOSTCC) -o $@ $^ | 85 | $(Q)$(HOSTCC) -o $@ $^ |
86 | 86 | ||
87 | drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options | 87 | OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary |
88 | strip-flags = $(addprefix --remove-section=,$(drop-sections)) | ||
89 | |||
90 | OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary $(strip-flags) | ||
91 | vmlinuz.bin: vmlinuz | 88 | vmlinuz.bin: vmlinuz |
92 | $(call if_changed,objcopy) | 89 | $(call if_changed,objcopy) |
93 | 90 | ||
94 | OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec $(strip-flags) | 91 | OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec |
95 | vmlinuz.srec: vmlinuz | 92 | vmlinuz.srec: vmlinuz |
96 | $(call if_changed,objcopy) | 93 | $(call if_changed,objcopy) |
97 | 94 | ||