LD_PRELOAD and attribute constructor

Mike Frysinger vapier@gentoo.org
Wed Jun 3 07:22:00 GMT 2009


On Tuesday 02 June 2009 22:01:18 David Hagood wrote:
> You really cannot count upon the execution order of constructors across
> compilation units. All that is guaranteed is that within one compilation
> unit (one source file) the constructors will execute in order. When you
> are dealing with more than one compilation unit - all bets are off: all
> that is guaranteed is that all static constructors will be called before
> main is called, but in what order? No guarantees.

that is true in the classical sense, but not with prioritized constructors 
that exists now in gcc/glibc.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20090603/39b7227b/attachment.sig>


More information about the Libc-help mailing list