This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: dlopen() does not call static constructors on HP-UX
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Harri Pasanen <harri at nerim dot net>
- Cc: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>, gcc at gcc dot gnu dot org
- Date: Thu, 12 Dec 2002 15:07:01 -0500
- Subject: Re: dlopen() does not call static constructors on HP-UX
>>>>> 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