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-13 18:00:32 +0200
commitb1640f63048e60c3289f81effd8930adc45d705a (patch)
tree647f59d41effcbd358aedff455a0fc97be1d7bf0
parent67fcf81d046d2f77689a5eb0b8f92955f8f48cfb (diff)
downloadzig-playground-b1640f63048e60c3289f81effd8930adc45d705a.tar.gz
zig-playground-b1640f63048e60c3289f81effd8930adc45d705a.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 $< $@