HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shl_load returns errno 22
Operating System - HP-UX
1835667
Members
3014
Online
110082
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
05-30-2002 03:34 AM
05-30-2002 03:34 AM
shl_load returns errno 22
The following line of C-code returns the errno 22:
shl_load(dllname,BIND_DEFERRED|DYNAMIC_PATH, )l);
The dllname is the name of a shared library, which can be found by the program (file permissions are ok). This was working before we converted to a Trusted System (OS = HP-UX 11.00).
What part of the arguments used can be invalid?
Thanks.
shl_load(dllname,BIND_DEFERRED|DYNAMIC_PATH, )l);
The dllname is the name of a shared library, which can be found by the program (file permissions are ok). This was working before we converted to a Trusted System (OS = HP-UX 11.00).
What part of the arguments used can be invalid?
Thanks.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2002 03:39 AM
05-30-2002 03:39 AM
Re: shl_load returns errno 22
Hi
Rebuild with LD_PRELOAD
I can guess that you need the latest linker patch and then use the LD_PRELOAD functionality to avoide this
You can use the LD_PRELOAD environment variable to load a shared library that contains thread-local storage to avoid the following error when loading the library dynamically:
/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1
Also error 22
The load order and symbol resolution order may be different in a PA32 program than in the same PA64 program because the dynamic loader uses depth-first search order in PA32 mode and breadth-first search order in PA64 mode.
The dynamic loader uses the LD_PRELOAD environment variable even if you use the +noenvvar in the link line. This insures that LD_PRELOAD is enabled even in a +compat link. The LD_PRELOAD variable is always enabled except for setuid and setgid programs.
Note: Using LD_PRELOAD can cause a core dump when used with applications which mix shared and archived libraries, especially when both the shared library and the application are built with aC++ or use libc.
You can specify multiple libraries as part of the LD_PRELOAD environment variable. Separate the libraries by spaces or colons as in LD_LIBRARY_PATH. (Multi-byte support is not provided as part of parsing the LD_PRELOAD library list). You can specify LD_PRELOAD libraries with absolute paths or relative paths. The LD_PRELOAD libraries can also consist of just the library names, in which case the dynamic loader uses the directory path list in the environment variables LD_LIBRARY_PATH and/or SHLIB_PATH or the embedded path list (if enabled) to search for the libraries.
The dynamic loader does not issue an error or warning message if it cannot find a library specified by LD_PRELOAD. However, if it does not find a dependent of the LD_PRELOAD libraries, the dynamic loader issues the same error message as if the LD_PRELOAD library is specified in the link line.
See man dld.sl when patch is loaded
Steve steel
Rebuild with LD_PRELOAD
I can guess that you need the latest linker patch and then use the LD_PRELOAD functionality to avoide this
You can use the LD_PRELOAD environment variable to load a shared library that contains thread-local storage to avoid the following error when loading the library dynamically:
/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1
Also error 22
The load order and symbol resolution order may be different in a PA32 program than in the same PA64 program because the dynamic loader uses depth-first search order in PA32 mode and breadth-first search order in PA64 mode.
The dynamic loader uses the LD_PRELOAD environment variable even if you use the +noenvvar in the link line. This insures that LD_PRELOAD is enabled even in a +compat link. The LD_PRELOAD variable is always enabled except for setuid and setgid programs.
Note: Using LD_PRELOAD can cause a core dump when used with applications which mix shared and archived libraries, especially when both the shared library and the application are built with aC++ or use libc.
You can specify multiple libraries as part of the LD_PRELOAD environment variable. Separate the libraries by spaces or colons as in LD_LIBRARY_PATH. (Multi-byte support is not provided as part of parsing the LD_PRELOAD library list). You can specify LD_PRELOAD libraries with absolute paths or relative paths. The LD_PRELOAD libraries can also consist of just the library names, in which case the dynamic loader uses the directory path list in the environment variables LD_LIBRARY_PATH and/or SHLIB_PATH or the embedded path list (if enabled) to search for the libraries.
The dynamic loader does not issue an error or warning message if it cannot find a library specified by LD_PRELOAD. However, if it does not find a dependent of the LD_PRELOAD libraries, the dynamic loader issues the same error message as if the LD_PRELOAD library is specified in the link line.
See man dld.sl when patch is loaded
Steve steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2002 04:12 AM
05-30-2002 04:12 AM
Re: shl_load returns errno 22
Hi
I don't get the /usr/lib/dld.sl error. I explicit do a printf of errno after the shl_load routine to see why the program doesn't work. I've download the latest ld patch now and will try it again after applying it.
Thanks.
I don't get the /usr/lib/dld.sl error. I explicit do a printf of errno after the shl_load routine to see why the program doesn't work. I've download the latest ld patch now and will try it again after applying it.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2002 06:13 AM
05-30-2002 06:13 AM
Re: shl_load returns errno 22
Changing the order of the libraries in the make file solved the problem:
Specifying -lc before -lpthread in threaded applications can cause run-time problems because the pthread/cma stubs are resolved instead of the real pthread/cma functions.
Also using LD_PRELOAD='/usr/lib/libpthread.1' worked.
Thanks for the suggestions.
Specifying -lc before -lpthread in threaded applications can cause run-time problems because the pthread/cma stubs are resolved instead of the real pthread/cma functions.
Also using LD_PRELOAD='/usr/lib/libpthread.1'
Thanks for the suggestions.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP