Re: [PATCH 5/5 V2] kvm tools: Initialize and use VESA and VNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Paolo Bonzini <pbonzini@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux