From c84a38b7728a635b3ad89bd96f77f41a3becad99 Mon Sep 17 00:00:00 2001 From: Dionna Glaze Date: Mon, 22 Jan 2024 23:35:37 +0000 Subject: [PATCH] Fix relocation error when linking stage1 Closes Issue#72 We've tested the addition of the -no-pie flag here and found it to both close Issue#72 and successfully boot, i.e., the build is correct. Signed-off-by: Dionna Glaze --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 066df3050..9b8483603 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ stage1/stage1.o: stage1/stage1.S stage1/stage2.bin stage1/svsm-fs.bin stage1/reset.o: stage1/reset.S stage1/meta.bin stage1/stage1: ${STAGE1_OBJS} - $(CC) -o $@ $(STAGE1_OBJS) -nostdlib -Wl,--build-id=none -Wl,-Tstage1/stage1.lds + $(CC) -o $@ $(STAGE1_OBJS) -nostdlib -Wl,--build-id=none -Wl,-Tstage1/stage1.lds -no-pie svsm.bin: stage1/stage1 objcopy -O binary $< $@