[Skiboot] [PATCH 1/4] build: -fno-asynchronous-unwind-tables

Nicholas Piggin npiggin at gmail.com
Sun Apr 14 22:50:38 AEST 2019


skiboot does not use unwind tables, this option saves about 100kB,
mostly from .text.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 Makefile.main | 2 +-
 skiboot.lds.S | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.main b/Makefile.main
index 8a99ec9f4..68c744d07 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -74,7 +74,7 @@ ifeq ($(DEBUG),1)
 CPPFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
 endif
 
-CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64
+CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64 -fno-asynchronous-unwind-tables
 CFLAGS += -mcpu=power7
 CFLAGS += -Wl,--oformat,elf64-powerpc
 CFLAGS += $(call try-cflag,$(CC),-ffixed-r13)
diff --git a/skiboot.lds.S b/skiboot.lds.S
index 8d09b40e6..6f6f77155 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -175,6 +175,7 @@ SECTIONS
 	/* Discards */
 	/DISCARD/ : {
 		*(.comment)
+		*(.eh_frame)
 		*(.interp)
 	}
 }
-- 
2.20.1



More information about the Skiboot mailing list