summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2025-04-13 18:00:32 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2025-04-14 22:43:55 +0200
commit95ee682b853ef61c7cc16c8c14a4a54cc42ce197 (patch)
tree303f80884bcd22fa16c51f683a0fa9fc56d0d751
parent5e04bc7e1ef4cb0b02ac8e1676380516ca005a2c (diff)
downloadzig-playground-95ee682b853ef61c7cc16c8c14a4a54cc42ce197.tar.gz
zig-playground-95ee682b853ef61c7cc16c8c14a4a54cc42ce197.zip
e820: reduce code size
Run into 512 byte size limit with different version of the compiler. Try to reduce code size by not emitting instructions to save/restore the frame pointer (not really needed for this toy example).
-rw-r--r--x86-bare-metal/mbr-e820/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/x86-bare-metal/mbr-e820/Makefile b/x86-bare-metal/mbr-e820/Makefile
index 5dc465f..99ed9d8 100644
--- a/x86-bare-metal/mbr-e820/Makefile
+++ b/x86-bare-metal/mbr-e820/Makefile
@@ -1,6 +1,6 @@
O := BUILD
-COMMON_FLAGS := -fno-unwind-tables -fno-strip -target x86-freestanding-code16 -O ReleaseSmall -mcpu=i386
+COMMON_FLAGS := -fno-unwind-tables -fno-strip -target x86-freestanding-code16 -O ReleaseSmall -mcpu=i386 -fomit-frame-pointer
$(O)/boot: $(O)/boot.elf | check_ep dump_info
objcopy -O binary $< $@