BACKPORT: Eliminate the .eh_frame sections from the aarch64 vmlinux and kernel modules
authorWilliam Cohen <wcohen@redhat.com>
Fri, 22 Jan 2016 03:56:26 +0000 (22:56 -0500)
committerJeff Vander Stoep <jeffv@google.com>
Sun, 18 Sep 2016 21:49:08 +0000 (14:49 -0700)
By default the aarch64 gcc generates .eh_frame sections.  Unlike
.debug_frame sections, the .eh_frame sections are loaded into memory
when the associated code is loaded.  On an example kernel being built
with this default the .eh_frame section in vmlinux used an extra 1.7MB
of memory.  The x86 disables the creation of the .eh_frame section.
The aarch64 should probably do the same to save some memory.

Signed-off-by: William Cohen <wcohen@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Bug: 30369029
Patchset: rework-pagetable

(cherry picked from commit 728dabd6d1751cf5e0f8e0535891393da62396e9)
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Change-Id: I697baae2209d6d11f2cc447459d935f7200eb7b1

arch/arm64/Makefile

index 4e77fd165f38ec3a7215bac31ee5539a0ac88a6a..693a4dc6220c82153578e81f998e56c2b5d946c3 100644 (file)
@@ -28,6 +28,7 @@ endif
 
 KBUILD_CFLAGS  += -mgeneral-regs-only $(lseinstr)
 KBUILD_CFLAGS  += -fno-pic
+KBUILD_CFLAGS  += -fno-asynchronous-unwind-tables
 KBUILD_AFLAGS  += $(lseinstr)
 
 ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)