linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc: strip debug information when building compressed images
@ 2019-07-31 17:19 Sven Schnelle
  2019-07-31 19:28 ` Helge Deller
  0 siblings, 1 reply; 9+ messages in thread
From: Sven Schnelle @ 2019-07-31 17:19 UTC (permalink / raw)
  To: deller; +Cc: linux-parisc, Sven Schnelle

When compiling the kernel with debug information i got the following error:

hppa-linux-gnu-ld: section .text LMA [0000000000e78000,0000000000e7b41f] overlaps section .rodata.compressed LMA [00000000000e0078,00000000015ad43d]
make[3]: *** [/home/svens/parisc-linux/src/arch/parisc/boot/compressed/Makefile:28: arch/parisc/boot/compressed/vmlinux] Error 1
make[2]: *** [/home/svens/parisc-linux/src/arch/parisc/boot/Makefile:17: arch/parisc/boot/compressed/vmlinux] Error 2
make[2]: Target 'arch/parisc/boot/bzImage' not remade because of errors.

While this might also be fixed by adjusting the linker script, i think we
should strip the debug information when generating the compressed image. This
reduces the size of vmlinuz/lifimage from ~69MB to 6.6MB when full debug
information is enabled.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 arch/parisc/boot/compressed/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
index 2da8624e5cf6..2a81997b1079 100644
--- a/arch/parisc/boot/compressed/Makefile
+++ b/arch/parisc/boot/compressed/Makefile
@@ -55,8 +55,11 @@ $(obj)/misc.o: $(obj)/sizes.h
 CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
 $(obj)/vmlinux.lds: $(obj)/sizes.h
 
+quiet_cmd_objcopy_strip_debug = OBJCOPY_STRIP_DEBUG $@
+      cmd_objcopy_strip_debug = $(OBJCOPY) --strip-debug $< $@
+
 $(obj)/vmlinux.bin: vmlinux
-	$(call if_changed,objcopy)
+	$(call if_changed,objcopy_strip_debug)
 
 vmlinux.bin.all-y := $(obj)/vmlinux.bin
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-31 20:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 17:19 [PATCH] parisc: strip debug information when building compressed images Sven Schnelle
2019-07-31 19:28 ` Helge Deller
2019-07-31 19:36   ` Helge Deller
2019-07-31 19:55     ` Sven Schnelle
2019-07-31 20:07       ` Helge Deller
2019-07-31 20:19         ` Sven Schnelle
2019-07-31 19:37   ` James Bottomley
2019-07-31 19:40     ` Helge Deller
2019-07-31 19:45       ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).