]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390/decompressor: discard __ksymtab and .eh_frame sections
authorVasily Gorbik <gor@linux.vnet.ibm.com>
Wed, 17 Jan 2018 13:51:57 +0000 (14:51 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 23 Jan 2018 06:36:54 +0000 (07:36 +0100)
__ksymtab sections created for exported symbols are not needed
during the decompressor phase and could be discarded to save the memory.
The source of those exports is ebcdic.o, which is linked into both
vmlinux and boot/compressed/vmlinux.

.eh_frame section is also unused and could be discarded from
boot/compressed/vmlinux. The same has been done for vmlinux in:
"s390/kernel: emit CFI data in .debug_frame and discard .eh_frame
sections".

Signed-off-by: Vasily Gorbik <gor@linux.vnet.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/boot/compressed/Makefile
arch/s390/boot/compressed/vmlinux.lds.S

index 29e3dc99b9164b2d902c6f492c5511eefa906af0..26d6a94f40f6987d95faf83d455c9a64389436ef 100644 (file)
@@ -14,6 +14,7 @@ targets += misc.o piggy.o sizes.h head.o
 KBUILD_CFLAGS := -m64 -D__KERNEL__ -O2
 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
 KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -msoft-float
+KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
 KBUILD_CFLAGS += $(call cc-option,-mpacked-stack)
 KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
 
index 0c42535ec696095078e63c77c36eefeb13b5b32d..8150132b144f75745764faa8bbf1b8c96779a375 100644 (file)
@@ -48,4 +48,10 @@ SECTIONS
                _ebss = .;
        }
        _end = .;
+
+       /* Sections to be discarded */
+       /DISCARD/ : {
+               *(.eh_frame)
+               *(*__ksymtab*)
+       }
 }