Keep relocated 16bit code so checkstack can use it.
[seabios.git] / Makefile
index 3a4a1e9345bc937f2fbe91696d7a408f24da0d33..bd5c184f9cba0421b2d76d20fb22299405bddb36 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -119,8 +119,8 @@ $(OUT)rom16.o: $(OUT)romlayout16.o $(OUT)rom32.o $(OUT)layout16.lds
 
 $(OUT)rom.o: $(OUT)rom16.o $(OUT)rom32.o $(OUT)rombios16.lds $(OUT)rombios.lds
        @echo "  Linking $@"
-       $(Q)$(LD) -T $(OUT)rombios16.lds $(OUT)rom16.o -R $(OUT)rom32.o -o $(OUT)rom16.final.o
-       $(Q)$(STRIP) $(OUT)rom16.final.o
+       $(Q)$(LD) -T $(OUT)rombios16.lds $(OUT)rom16.o -R $(OUT)rom32.o -o $(OUT)rom16.reloc.o
+       $(Q)$(STRIP) $(OUT)rom16.reloc.o -o $(OUT)rom16.final.o
        $(Q)$(OBJCOPY) --extract-symbol --adjust-vma 0xf0000 $(OUT)rom16.o $(OUT)rom16.moved.o
        $(Q)$(LD) -T $(OUT)rombios.lds $(OUT)rom16.final.o $(OUT)rom32.o -R $(OUT)rom16.moved.o -o $@