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

Ingo Molnar
2011-05-25T08:38:36Z

* Paolo Bonzini <pbonzini@redhat.com> wrote:

> > ((constructor)) has showstopper properties:
> >
> > - We don't have access to the program arguments
> >
> > - stdio is probably not set up yet (this is undefined AFAICS)
>
> As I said, you can do this even better by doing only minimal work in
> the constructor. [...]

The costs of doing that:

- extra per init entry data structures

- extra code being run during the constructor phase

- the risk of not getting the ((constructor)) init run at all,
such as on static libraries

The only benefit is:

- ((constructor)) is a non-portable GCC extension so the only portability
win is to possibly support non-ELF targets. Which ones do we care about?

At this point it is a rather legitimate technical decision for us to say that
we do not want to bear those cost for that limited benefit, wouldn't you agree?

If someone adds non-ELF support then it can all be switched over to the bit
more bloated ((constructor)) approach rather easily - so this all is a
non-issue really.

Thanks,

Ingo