From: law@redhat.com
To: "Ed Harcourt" <harcourt@cadence.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: g++ 2.95.2 on HP-UX 11: __do_global_ctors() not getting called?
Date: Thu, 20 Jun 2002 10:30:00 -0000 [thread overview]
Message-ID: <25296.1024594441@porcupine.cygnus.com> (raw)
In-Reply-To: Your message of Thu, 20 Jun 2002 13:22:05 EDT. <B64C24D6DF7BF040BAF59B923D06180B990096@exmbx01chel.global.cadence.com>
In message <B64C24D6DF7BF040BAF59B923D06180B990096@exmbx01chel.global.cadence.c
om>, "Ed Harcourt" writes:
> I have a C++ shared library built using g++ 2.95.2 on HP-UX 11. The library
> linked using the HP-UX linker not the GNU linker. The library gets
> dynamically loaded with a call to shl_load(). When the library is loaded
> nonlocal static initializations don't get executed. In fact I noticed that
> if I link in the shared library statically then I can see a call stack that
> includes some rather important sounding functions like __main() and
> __do_global_ctors(). But if this library dynamically loaded using shl_load
> then these functions don't seem to get called.
You have to use shl_findsym to get a pointer to the shared library
initializer routine and call it yourself.
jeff
prev parent reply other threads:[~2002-06-20 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-20 10:22 Ed Harcourt
2002-06-20 10:30 ` law [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25296.1024594441@porcupine.cygnus.com \
--to=law@redhat.com \
--cc=gcc-help@gcc.gnu.org \
--cc=harcourt@cadence.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).