- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Regarding behaviour of dlopen in HP-UX
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
Discussions
Discussions
Forums
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
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
тАО04-19-2006 09:16 PM
тАО04-19-2006 09:16 PM
Regarding behaviour of dlopen in HP-UX
While starting of the application, it will load some .sl(for example a.sl, b.sl, c.sl etc) files using shl_load.
In the middle of the application, I will once again try to load a.sl and b.sl and get some information and will close. This we are doing with dlopen() and dlclose().
As far as i know , if we try to load shared library file which is already loaded, again it will not load the library but it will increase the reference count. This behaviour is in solaris. Is the Same behaviour for HP-UX?
When trying to do dlclose(), a.sl is still there in memory but b.sl is unloaded completely. But this is not happening on the solaris, both shared libraries are still present. Our requirement is in HP-UX also both libraries should be present.
Can anyone tell me why this is happening? Do i need to specify any special flags?
Quick response is appreciated.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2006 10:46 PM
тАО04-19-2006 10:46 PM
Re: Regarding behaviour of dlopen in HP-UX
WARNINGS
>>A successful invocation of dlclose does not guarantee that the objects associated with handle have actually been removed from the address space of the process. Objects loaded by one invocation of dlopen may also be loaded by another invocation of dlopen. The same object may also be opened multiple times. An object is not removed from the address space until all references to that object through an explicit dlopen invocation have been closed and all other objects implicitly referencing that object have also been closed.
>>Once an object has been closed by dlclose, referencing symbols contained in that object can cause undefined behavior.
Also, can I assume you are using the -ldl flag with the compiler or with the loader?
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2006 02:23 AM
тАО04-20-2006 02:23 AM
Re: Regarding behaviour of dlopen in HP-UX
Whether i have to compile the application with -ldl or compile the shared library(a.sl) with -ldl?
Application is not compiled with -ldl.
But if i want to compile what is the path of libdl.sl file?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2006 02:37 AM
тАО04-20-2006 02:37 AM
Re: Regarding behaviour of dlopen in HP-UX
with symbolic links pointing to it:
/usr/lib/pa20_64/libdl.sl -> ./libdl.1
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2006 03:51 AM
тАО04-21-2006 03:51 AM
Re: Regarding behaviour of dlopen in HP-UX
you should add
-ldl
to the linker commandline for all executables or shared objects calling dlopen().
In Solaris (as in HP-UX or Linux) you get a handle after with a successful call to dlopen - even when opening the same more than once.
Using a (once) valid handle after a dlcose() may succeed, when another handle of the same shared object is open. But you won't do that.neither in Solaris or HP-UX.
mfG Peter