dlopen() does not call static constructors on HP-UX
David Edelsohn
dje@watson.ibm.com
Thu Dec 12 12:26:00 GMT 2002
>>>>> Harri Pasanen writes:
Harri> It is possible to make the above process fully automatic, but it
Harri> requires first building the shared lib, looking if the _GLOBAL__FI_*
Harri> symbol is present and then rebuilding it.
Harri> So all this is done without any modifications to gcc itself. Can you
Harri> see any pitfalls with my approach? I'll let you know if I run into
Harri> any problems.
You do not need to build the library twice. GCC's collect2 knows
the name of the function. I would suggest looking at how I enabled
something similar in collect2.c for AIX. Look for LD_INIT_SWITCH.
David
More information about the Gcc
mailing list