Skip to contentSkip to conversation

qemu-kvm tests: fix linker script problem

PATCH Applied Naphtali Sprei 2 participants 2 messages May 5, 2010 – May 11, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 qemu-kvm tests: fix linker script problem

commit 848bd0c89c83814023cf51c72effdbc7de0d18b7 causes the linker script itself (flat.lds) to become part of the linked objects, which messed the output file, specifically, the symbol edata is not the last symbol anymore.

changes v2 -> v3

Instead of using a separate rule, which doesn't really adds the flat.lds to the prerequisite list, use Avi suggestion of filtering.

---
 kvm/user/config-x86-common.mak |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kvm/user/config-x86-common.mak +1 -1
index 61cc2f0..cf36aa1 100644
@@ -20,7 +20,7 @@ libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name)
 
 FLATLIBS = test/lib/libcflat.a $(libgcc)
 %.flat: %.o $(FLATLIBS) flat.lds
-	$(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS)
+	$(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $(filter %.o, $^) $(FLATLIBS)
 
 tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
                $(TEST_DIR)/smptest.flat  $(TEST_DIR)/port80.flat \
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 8 lines · Naphtali Sprei

commit 848bd0c89c83814023cf51c72effdbc7de0d18b7 causes the linker script itself (flat.lds) to become part of the linked objects, which messed the output file, specifically, the symbol edata is not the last symbol anymore.

changes v2 -> v3

Quoted 7 lines

Instead of using a separate rule, which doesn't really adds the flat.lds to the prerequisite list, use Avi suggestion of filtering.

---
 kvm/user/config-x86-common.mak |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.