From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [patch 2/5] libelf: use for x86 dom0 builder. Date: Wed, 24 Jan 2007 09:41:23 +0100 Message-ID: <45B71BB3.8040806@suse.de> References: <20070123145344.754866428@suse.de> <20070123145409.269613149@suse.de> <6b41881e10b3a4b8a282b811b53684b3@xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6b41881e10b3a4b8a282b811b53684b3@xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Emmanuel Ackaouy Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, >> -obj-y += elf.o >> -obj-$(CONFIG_COMPAT) += elf32.o >> +#obj-y += elf.o >> +#obj-$(CONFIG_COMPAT) += elf32.o > > Can we just zap those lines? Once ia64 is tested and ppc dom0 builder is ported over to libelf we can. >> + /* compatibility check */ >> + compatible = 0; >> + compat32 = 0; >> + machine = elf_uval(&elf, elf.ehdr, e_machine); >> + switch (CONFIG_PAGING_LEVELS) { > > Can we make this a compile time check instead of run-time? CONFIG_PAGING_LEVELS is a constant, thus it actually is compile-time, the gcc optimizer should throw away the unused code paths. I prefer this way over cluttering the source with #ifdefs. > Also, it > would seem easier to do all the checks first and then do a printk > specifying which kernel we found and, if it's not compatible with the > hypervisor, why not. I intentionally print kernel and xen type unconditionally. I think it is useful to have that information in the log, even if the combination is not incompatible. cheers, Gerd -- Gerd Hoffmann