qemu-kvm tests: fix linker script problem
PATCH 1/1 qemu-kvm tests: fix linker script problem
This is a fix to a previous patch by me.
It's on 'next' branch, as of now.
commit 848bd0c89c83814023cf51c72effdbc7de0d18b7 causes the linker script itself (flat.lds) to become part of the linked objects, which messed the output file, one such problem is that symbol edata is not the last symbol anymore.
--- kvm/user/config-x86-common.mak | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kvm/user/config-x86-common.mak +1 -1
@@ -19,7 +19,7 @@ CFLAGS += -m$(bits) libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name) FLATLIBS = test/lib/libcflat.a $(libgcc) -%.flat: %.o $(FLATLIBS) flat.lds +%.flat: %.o $(FLATLIBS) $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS) tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
Signature · 1 line
1.6.3.3
Quoted 15 lines · Naphtali Sprei
This is a fix to a previous patch by me.
It's on 'next' branch, as of now.commit
848bd0c89c83814023cf51c72effdbc7de0d18b7causes the linker script itself (flat.lds) to become part of the linked objects, which messed the output file, one such problem is that symbol edata is not the last symbol anymore.kvm/user/config-x86-common.mak +0
-0
kvm/user/config-x86-common.mak CFLAGS += -m$(bits) · line 25
Quoted 8 lines
kvm/user/config-x86-common.mak +1
-1@@ -19,7 +19,7 @@ CFLAGS += -m$(bits) libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name) FLATLIBS = test/lib/libcflat.a $(libgcc) -%.flat: %.o $(FLATLIBS) flat.lds +%.flat: %.o $(FLATLIBS) $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS)
This drops the dependency, so if flat.lds changes, we don't rebuild.
I think you can replace $^ by $(filter %.o, $^) and retain the dependency.
Signature · 1 line
error compiling committee.c: too many arguments to function