- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Another share library question.
Operating System - HP-UX
1748198
Members
2571
Online
108759
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
Discussions
Discussions
Forums
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
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
тАО02-13-2001 11:50 PM
тАО02-13-2001 11:50 PM
Another share library question.
I have a program A which call a shared library b.sl, using shl_load.
the make file is:
b.sl: b.C
$(CC) +z -b -Wl,-E,-B,immediate,+s -o b.sl b.C -L/test/lib -lmylib
A: A.C
$(CC) -z +z -Wl,+s +DAportable -o A A.C -ldld
mylib is another share library. mylib isn't used anywhere, just for test.
when I run A, I was told "can't load the library".(the shl_load return value is equal to NULL).
After I changed my make file to this:
b.sl: b.C
$(CC) +z -b -Wl,-E,-B,immediate,+s -o b.sl b.C -L/test/lib -lmylib
A: A.C
$(CC) -z +z -Wl,+s +DAportable -o A A.C -ldld -L /test/lib -lmylib
( add -L/test/lib -lmylib when compile A).
it can work correctly.
I use hp11 and aCC 3.25 and my SHLIB_PATH=.:/test/lib
I don't know the reason.
the make file is:
b.sl: b.C
$(CC) +z -b -Wl,-E,-B,immediate,+s -o b.sl b.C -L/test/lib -lmylib
A: A.C
$(CC) -z +z -Wl,+s +DAportable -o A A.C -ldld
mylib is another share library. mylib isn't used anywhere, just for test.
when I run A, I was told "can't load the library".(the shl_load return value is equal to NULL).
After I changed my make file to this:
b.sl: b.C
$(CC) +z -b -Wl,-E,-B,immediate,+s -o b.sl b.C -L/test/lib -lmylib
A: A.C
$(CC) -z +z -Wl,+s +DAportable -o A A.C -ldld -L /test/lib -lmylib
( add -L/test/lib -lmylib when compile A).
it can work correctly.
I use hp11 and aCC 3.25 and my SHLIB_PATH=.:/test/lib
I don't know the reason.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 04:10 AM
тАО02-14-2001 04:10 AM
Re: Another share library question.
If your "mylib" uses the thread-local-storage APIs, then the problem could well be this: when program A tries to shl_load shared-library B which in turn has mylib --if not as a run-time dependency-- at least as a build-time dependency, the classic dynamic-loader limitation is in effect, viz. it cannot load, at runtime, a library which either itself or through its dependents uses TLStorage.
When you modify the build-script of program A to link with mylib at compile-time (instead of linking at run-time as a dependency of B), shl_load(B) does not have to load mylib because it is already there...
Hope this explains it.
When you modify the build-script of program A to link with mylib at compile-time (instead of linking at run-time as a dependency of B), shl_load(B) does not have to load mylib because it is already there...
Hope this explains it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 04:43 AM
тАО02-14-2001 04:43 AM
Re: Another share library question.
thank you for your reply. I find the reason. I use shl_load only with bind_immediate. when I change to use shl_load with bind_immediate and bind_nonfatal. it can work. But one thing I can't understand is I add -Wl,B,immediate in the make file. I thought it can check unresolved symbol. but the fact is that it don't work. I don't know the reason. By the way, mylib is no relation to thread.
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP