- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Creating shared library
Operating System - HP-UX
1753805
Members
7533
Online
108805
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
тАО08-21-2001 09:30 PM
тАО08-21-2001 09:30 PM
Creating shared library
Hi,
I'm trying to create a shared library that uses another
third party static (.a) library. During compilation I got the message:
ld: Invalid loader fixup for symbol "$000001B5".
Probably, the library sources were compiled without +z option, but I haven't these sources.
There is no problem with creating an executable that uses this library.
May by somebody can help me with that.
Thanks,
Igor
I'm trying to create a shared library that uses another
third party static (.a) library. During compilation I got the message:
ld: Invalid loader fixup for symbol "$000001B5".
Probably, the library sources were compiled without +z option, but I haven't these sources.
There is no problem with creating an executable that uses this library.
May by somebody can help me with that.
Thanks,
Igor
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2004 11:53 PM
тАО09-06-2004 11:53 PM
Re: Creating shared library
Hello Voloshin,
Here i have tested with sample code.
# cat sdisplay.c
#include
void sdisplay()
{
printf("Message from static lib\n");
}
# cat ddisplay.c
#include
void ddisplay()
{
sdisplay();
printf("Message from dynamic lib\n");
}
# cat main.c
#include
int main()
{
ddisplay();
printf("Message from main");
return 0;
}
# cc -c sdisplay.c
# ar cq libsdisplay.a sdisplay.o
# cc +z -c ddisplay.c
# ld -b -o libddisplay.so ddisplay.o\
-L. -lsdisplay
# cc main.c -L. -lddisplay
# ./a.out
Message from static lib
Message from dynamic lib
Message from main
First created dynamic object with +z option, use ld to create the dynamic library with static.
I hope this will work for your problem.
regards,
kalimuthu
Here i have tested with sample code.
# cat sdisplay.c
#include
void sdisplay()
{
printf("Message from static lib\n");
}
# cat ddisplay.c
#include
void ddisplay()
{
sdisplay();
printf("Message from dynamic lib\n");
}
# cat main.c
#include
int main()
{
ddisplay();
printf("Message from main");
return 0;
}
# cc -c sdisplay.c
# ar cq libsdisplay.a sdisplay.o
# cc +z -c ddisplay.c
# ld -b -o libddisplay.so ddisplay.o\
-L. -lsdisplay
# cc main.c -L. -lddisplay
# ./a.out
Message from static lib
Message from dynamic lib
Message from main
First created dynamic object with +z option, use ld to create the dynamic library with static.
I hope this will work for your problem.
regards,
kalimuthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 12:02 AM
тАО09-07-2004 12:02 AM
Re: Creating shared library
Hi Igor,
Can you sheare the compile line options for the .o as well as the library.
manish
Can you sheare the compile line options for the .o as well as the library.
manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2004 01:34 AM
тАО09-08-2004 01:34 AM
Re: Creating shared library
building a shared library needs that the object contain position-independent code (pic) - this is what is achieved with +z compile option.
if the object code is non-pic, there is no way to build a shared library from it.
also i think there is no supported way of converting non-pic code to pic.
--
ranga
[i work for hpe]
if the object code is non-pic, there is no way to build a shared library from it.
also i think there is no supported way of converting non-pic code to pic.
--
ranga
[i work for hpe]
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