Peter Volkov wrote:
В Птн, 30/05/2008 в 20:28 -0700, Brian Harring пишет:
Either way, basically it's coming down to if gentoo wants to follow the definition of 'academic' right, or 'pragmatic' right. Exempting ciaran, vote seems to be pragmatic.

Well, although I've asked about problems with having --as-needed by
default, I'd better go with academic. C++ is quite common language to
ignore its design problems and in the end it's not hard to define
LDFLAGS in make.conf.


To clarify:

- static initializers (as in __attribute__((constructor), so no, it isn't a C++ only feature) have nothing wrong with --as-needed.

- ugly code that refers to undefined symbols that are resolved to ones from the main binary and written in the constructor is broken already in systems not allowing undefined refs.

- you don't have guarantees about the order in witch the .init sections are parsed and constructor function are called, they can be called in parallel and you have no means to have a predictable behavior, all you know is that everything will be called right before main() or as the first thing in dlopen().

- doing such stuff is uncommon since it isn't the simplest thing to do, doesn't work in every place, you have to be particular perverse and convoluted even to think about this.

- making such thing go away is good for security, maintainability and sanity.

lu

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

--
gentoo-dev@lists.gentoo.org mailing list

Reply via email to