From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [qemu-kvm tests PATCH] qemu-kvm tests: fix linker script problem Date: Wed, 05 May 2010 11:57:57 +0300 Message-ID: <4BE13315.10802@redhat.com> References: <4BDEB4CB.2000105@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Naphtali Sprei Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63590 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933344Ab0EEI6A (ORCPT ); Wed, 5 May 2010 04:58:00 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o458vxrV015950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 5 May 2010 04:57:59 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o458vwHa031300 for ; Wed, 5 May 2010 04:57:59 -0400 In-Reply-To: <4BDEB4CB.2000105@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/03/2010 02:34 PM, Naphtali Sprei wrote: > 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. > > > > diff --git a/kvm/user/config-x86-common.mak b/kvm/user/config-x86-common.mak > index 61cc2f0..ad7aeac 100644 > --- a/kvm/user/config-x86-common.mak > +++ b/kvm/user/config-x86-common.mak > @@ -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. -- error compiling committee.c: too many arguments to function