From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 5/5 V2] kvm tools: Initialize and use VESA and VNC Date: Tue, 24 May 2011 21:40:19 +0200 Message-ID: <20110524194019.GA27634@elte.hu> References: <1306149553-26793-1-git-send-email-levinsasha928@gmail.com> <1306149553-26793-5-git-send-email-levinsasha928@gmail.com> <20110523113824.GE4042@elte.hu> <4DDB6E55.8080408@redhat.com> <20110524085024.GA31453@elte.hu> <4DDB77E5.4080306@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sasha Levin , penberg@kernel.org, john@jfloren.net, kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com To: Paolo Bonzini Return-path: Received: from mx3.mail.elte.hu ([157.181.1.138]:46992 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751408Ab1EXTkd (ORCPT ); Tue, 24 May 2011 15:40:33 -0400 Content-Disposition: inline In-Reply-To: <4DDB77E5.4080306@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: * Paolo Bonzini wrote: > On 05/24/2011 10:50 AM, Ingo Molnar wrote: > > - C constructors have random limitations like apparently not being executed if > > the constructor is linked into a .a static library. > > Ah, forgot about this. Given _why_ this happens (for static libraries, the > linker omits object modules that are not required to fulfill undefined > references in previous objects), I'd be surprised if explicit section tricks > do not have the same limitation. [...] Since we create an actual array (data) and iterate it the worst i can imagine is the linker dropping those sections - in which case the build will fail and we are alerted to the problem. With ((constructor)) the program will misbehave silently - not good. > [...] After all the constructor attribute is only syntactic sugar for section > tricks. Yeah but not just syntactic sugar but also code built into glibc to execute them at some point before main(). And this last bit really matters as well. Thanks, Ingo