- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- static constructors in dlopen
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 02:59 PM
10-02-2003 02:59 PM
static constructors in dlopen
Does anyone know if there is a way to break in each of the static constructors called during dlopen() or destructors during dlclose() of a C++ library.
Currently, I am debugging a problem, where the program segfaults in dlclose() when I close the C++ shared library loaded through dlopen(). I suspect that there is a problem with the static destructors.
I have tried including the cpprt0.s stub suggested in some website and also tried using shl_load() instead of dlopen() and in both the cases it fails while closing.
Does anyone has faced a similar problem? If so can you let me know how to debug it.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2003 06:54 PM
10-02-2003 06:54 PM
Re: static constructors in dlopen
what compiler and linker are you using ? is this a 32-bit or a 64-bit application ?
--
ranga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 01:50 AM
10-03-2003 01:50 AM
Re: static constructors in dlopen
Yes, I compile with aCC and it's on 32bit platform
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 03:44 PM
10-03-2003 03:44 PM
Re: static constructors in dlopen
by the way, you dont just compile with aCC, you also link with it with the "-b" option when building the shared library. cpprt0.s is not required with aCC (i think it may be relevant to either g++ or the obsolete cfront). aCC includes /opt/aCC/lib/shlrt0.o in the link line (and adds an initializer/terminator __shlInit with the +I linker option). however if your initializer is being called, you dont need to bother about all this, just try the latest linker/loader patch and let us know if the problem still exists.
--
ranga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2003 03:50 PM
10-03-2003 03:50 PM
Re: static constructors in dlopen
i am not very sure if this helps: "odump -slinit" will list the initializers of the shared library, perhaps you can proceed from here to set breakpoints.
--
ranga