]> xenbits.xensource.com Git - mini-os.git/commitdiff
mini-os: provide binary without debug information
authorJuergen Gross <jgross@suse.com>
Thu, 16 Apr 2020 12:27:48 +0000 (14:27 +0200)
committerWei Liu <wl@xen.org>
Thu, 16 Apr 2020 13:29:46 +0000 (14:29 +0100)
Provide a mini-os binary stripped from debug information in order to
have a smaller resulting kernel file. The binary with debug
information is kept with the suffix "-debug".

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Makefile

index 6a05de6f8d28659103f17c3919948baa76593b7a..be640cda02c6779b4a857c1a20c11a1d195c7f33 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -167,7 +167,9 @@ $(OBJ_DIR)/arch/x86/minios-x86%.lds:  arch/x86/minios-x86.lds.S
 $(OBJ_DIR)/$(TARGET): $(OBJS) $(APP_O) arch_lib $(OBJ_DIR)/$(TARGET_ARCH_DIR)/minios-$(MINIOS_TARGET_ARCH).lds
        $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o
        $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
-       $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
+       $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@-debug
+       strip -s $@-debug -o $@
+       gzip -n -f -9 -c $@-debug >$@-debug.gz
        gzip -n -f -9 -c $@ >$@.gz
 
 .PHONY: config