Bochs/bochs-testing/plugin-test/test11-modglobalconstr
Bryce Denney dad1e7b3e9 - build the module symbol name myself instead of letting ltdl do it. On win32
I'm using ltdl even it considers my DLLs to NOT be a libtool archive, and
this is making the symbol name transformation mess up.  If I do it myself,
I can avoid this.
2002-10-17 06:49:44 +00:00
..
main.cc - build the module symbol name myself instead of letting ltdl do it. On win32 2002-10-17 06:49:44 +00:00
main.h - add test11, which checks whether global constructors in a shared lib a 2002-10-16 15:04:44 +00:00
Makefile.in - add test11, which checks whether global constructors in a shared lib a 2002-10-16 15:04:44 +00:00
module1.cc - change symbols to "module1_LTX_name" instead of "libmodule1_LTX_name" 2002-10-17 06:48:05 +00:00
module2.cc - change symbols to "module1_LTX_name" instead of "libmodule1_LTX_name" 2002-10-17 06:48:05 +00:00
modules.h - eliminate duplicat symbols across modules 2002-10-17 05:53:50 +00:00
README - detect if we're about to crash due to global constructor problems, and 2002-10-17 00:33:50 +00:00
uselib.out.expected - add test11, which checks whether global constructors in a shared lib a 2002-10-16 15:04:44 +00:00

test11-modglobalconstr

This is the description from test10-modvirtual:
> Create an interface class in modules.h called DeviceInterface.  Each module
> creates a child class of DeviceInterface, and implements its methods.  This
> test loads the modules, calls the module's module_init() which instantiates a
> subclass of DeviceInterface and returns a pointer to it.  Then main can 
> operate on this object using the DeviceInterface class.

In test11, I have changed only one thing.  Module2's class is created 
by a global constructor.  Global constructors SHOULD be called when
the module loads, but if your C++ compile/link process is broken or
libtool uses the wrong link args, then sometimes global constructors in 
shared libs are NOT loaded.

If test10 succeeds, but test11 fails, then you will know that your
platform does not call global constructors on shared libraries
when they are loaded.