From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Convert .flat files to 32-bit elf format Date: Sun, 05 Dec 2010 14:37:36 +0200 Message-ID: <4CFB8790.8000100@redhat.com> References: <1291536938-12878-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59049 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755178Ab0LEMhn (ORCPT ); Sun, 5 Dec 2010 07:37:43 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 12/05/2010 02:05 PM, Alexander Graf wrote: > > > > diff --git a/config-x86-common.mak b/config-x86-common.mak > > index b541c1c..c5508b3 100644 > > --- a/config-x86-common.mak > > +++ b/config-x86-common.mak > > @@ -20,9 +20,12 @@ CFLAGS += -m$(bits) > > libgcc := $(shell $(CC) -m$(bits) --print-libgcc-file-name) > > > > FLATLIBS = lib/libcflat.a $(libgcc) > > -%.flat: %.o $(FLATLIBS) flat.lds > > +%.elf: %.o $(FLATLIBS) flat.lds > > $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $(filter %.o, $^) $(FLATLIBS) > > > > +%.flat: %.elf > > + objcopy -O elf32-i386 $^ $@ > > Not sure it's that great to call 32bit elf binaries ".flat". I'd rather expect a flat file when reading that file extension ;). Mind to just call it ".elf32"? It's a reminder from the good old days that these were flat files loaded by kvmctl. > Alternatively, you could also use real flat files and shove a multiboot header into the binary. I'll rename them in a later patch. .elf32 isn't a good name either, it implies 32-bit execution, whereas it's just the file format due to multiboot constraints. Maybe .test (and .test32 and .test64 when we build both). -- error compiling committee.c: too many arguments to function