Support for builtin dlls with C++ global constructors.

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

 



Hi,
  the following provides a method of allowing builtin dlls which use C++ global
constructors which make interdll function calls to function. There should not
be any impact to spec file generation if the DelayElfInitialization option is
not provided.

  What it does is delay the libc ELF intialization of the builtin ELF dll until
the process attach happens. When the entry code for the dll is run the ELF
initialization is first completed (which results in C++ constructors being run)
and then the process attach is continued as per usual.

  One slightly strange thing that might be confusing is that all builtin dlls,
with this option specified, will have dll entry points even if one is not
specified in the .spec file. This entry point will just run the ELF
initialization and then return.

  You will need to have a linker which supports changing the ELF intialization
routine; ld, which existed in the gcc-2.95.* timeframe, does not have this
functionality as it was added sometime in '99 (if my memory serves me).
However, it's simple to patch in if you really need it.

+       * tools/winebuild/spec32.c, tools/winebuild/main.c, tools/winebuild/parser.c, tools/winebuild/build.h, tools/winebuild/README
+       Peter Hunnisett <peter@transgaming.com>
+       Add support for making builtin dlls initialized in the same order as
+       PE dlls. This is only of concern for dlls which use constructors
+       (C++).


Ciao,
Peter





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux