wut/rules/rpl.mk
James Benton e46445c3ec 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.
2015-12-27 20:02:20 -08:00

13 lines
406 B
Makefile

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 -z common-page-size=64 -z max-page-size=64
include $(WUT_ROOT)/rules/base.mk
%.rpx: %.elf
@$(STRIP) $< -o $(BUILDDIR)/$(notdir $<)
%.rpl: %.elf
@$(STRIP) $< -o $(BUILDDIR)/$(notdir $<)