summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/Makefile.pcbios12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/arch/x86/Makefile.pcbios b/src/arch/x86/Makefile.pcbios
index 18a6f759..f8c22535 100644
--- a/src/arch/x86/Makefile.pcbios
+++ b/src/arch/x86/Makefile.pcbios
@@ -12,6 +12,10 @@ LDSCRIPT = arch/x86/scripts/pcbios.lds
#
LDFLAGS += -N --no-check-sections
+# Prefix always starts at address zero
+#
+LDFLAGS += --section-start=.prefix=0
+
# Media types.
#
MEDIA += rom
@@ -103,13 +107,13 @@ NON_AUTO_MEDIA += fd0
# Special target for building Master Boot Record binary
$(BIN)/mbr.bin : $(BIN)/mbr.o
- $(QM)$(ECHO) " [OBJCOPY] $@"
- $(Q)$(OBJCOPY) -O binary $< $@
+ $(QM)$(ECHO) " [LD] $@"
+ $(Q)$(LD) $(LDFLAGS) -o $@ --oformat binary -e 0 $<
# rule to make a USB disk image
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
- $(QM)$(ECHO) " [OBJCOPY] $@"
- $(Q)$(OBJCOPY) -O binary $< $@
+ $(QM)$(ECHO) " [LD] $@"
+ $(Q)$(LD) $(LDFLAGS) -o $@ --oformat binary -e 0 $<
NON_AUTO_MEDIA += usb
%usb: $(BIN)/usbdisk.bin %hd