Skip to contentSkip to conversation

mini-os: provide binary without debug information

PATCH Applied Juergen Gross 3 participants 3 messages Apr 16, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mini-os: provide binary without debug information

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".

---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Makefile +3 -1
index 6a05de6..be640cd 100644
@@ -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 [email protected]
 	$(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start [email protected] [email protected]
-	$(LD) $(LDFLAGS) $(LDFLAGS_FINAL) [email protected] $(EXTRA_OBJS) -o $@
+	$(LD) $(LDFLAGS) $(LDFLAGS_FINAL) [email protected] $(EXTRA_OBJS) -o $@-debug
+	strip -s $@-debug -o $@
+	gzip -n -f -9 -c $@-debug >[email protected]
 	gzip -n -f -9 -c $@ >[email protected]
 
 .PHONY: config
Signature · 1 line
2.16.4
Reviewed-by on v1 1/1
#1 lore raw

Juergen Gross, le jeu. 16 avril 2020 14:27:48 +0200, a ecrit:

Quoted 5 lines

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".

Quoted 22 lines
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Makefile +3 -1
index 6a05de6..be640cd 100644
@@ -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 [email protected]
 	$(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start [email protected] [email protected]
-	$(LD) $(LDFLAGS) $(LDFLAGS_FINAL) [email protected] $(EXTRA_OBJS) -o $@
+	$(LD) $(LDFLAGS) $(LDFLAGS_FINAL) [email protected] $(EXTRA_OBJS) -o $@-debug
+	strip -s $@-debug -o $@
+	gzip -n -f -9 -c $@-debug >[email protected]
 	gzip -n -f -9 -c $@ >[email protected]
 
 .PHONY: config
Signature · 1 line
2.16.4
Applied
#2 lore raw
Quoted 9 lines · Samuel Thibault

Juergen Gross, le jeu. 16 avril 2020 14:27:48 +0200, a ecrit:

Quoted 5 lines

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".

Applied.