From e46445c3ecd590f51ec883b9db1809a3a17a32e6 Mon Sep 17 00:00:00 2001 From: James Benton Date: Sun, 27 Dec 2015 20:02:20 -0800 Subject: [PATCH] Set linker page size to reduce padding. Previously every PHDR had align(0x1000) creating huge amounts of padding. Changing page size to 64 changes PHDR align to 0x40, reducing elf size. --- rules/rpl.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/rpl.mk b/rules/rpl.mk index 73148d51..d095da79 100644 --- a/rules/rpl.mk +++ b/rules/rpl.mk @@ -1,7 +1,7 @@ LIBPATHS := -L$(WUT_ROOT)/lib CFLAGS := -I$(WUT_ROOT)/include -fno-builtin -ffreestanding CXXFLAGS := $(CFLAGS) -LDFLAGS := -nostdlib -nostartfiles $(WUT_ROOT)/lib/crt0.o -T $(WUT_ROOT)/rules/rpl.ld -pie -fPIE +LDFLAGS := -nostdlib -nostartfiles $(WUT_ROOT)/lib/crt0.o -T $(WUT_ROOT)/rules/rpl.ld -pie -fPIE -z common-page-size=64 -z max-page-size=64 include $(WUT_ROOT)/rules/base.mk