- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ld: Invalid loader fixup in text space needed in o...
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
04-22-2003 10:25 AM
04-22-2003 10:25 AM
I created a simple "hello world" program and compiled/linked as follows:
aCC -c +z main.cpp -o main.o
ld -v -b -t -o main.sl main.o -l:libc.a
Everything works beautifully.
I then take more complex c++ code, compiling and linking as above. However, with the more complex code, I receive the following error:
ld: Invalid loader fixup in text space needed in output file for symbol "$00000037" in input file: "/usr/lib/libc.a(doprnt.o)"
I used nm on libc to reveal the following information:
doprnt.o:
U $$div2I
U $$divI_10
U $$divI_5
U $$mul2U
U $$rem2I
00002ed8 t $00000037
00000980 t $00000038
So, what in my code would cause this error? And more importantly, how do I fix it?
Thanks,
Andy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 11:16 AM
04-22-2003 11:16 AM
Re: ld: Invalid loader fixup in text space needed in output file for symbol
In the first place I dont understand why are you creating a shared library by including the libc archive library.
Make sure that you create the shared library with the necessary object files only and executble with libc.sl instead of libc.a.
Hope this helps
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 11:28 AM
04-22-2003 11:28 AM
Re: ld: Invalid loader fixup in text space needed in output file for symbol
I figured that I could link the static (archive) libraries into my shared library. I'm guessing that the linker is having a problem because libc.a was not compiled with PIC.
So, I guess here are my questions:
1) Is it safe to assume that the shared libraries will be there, or do I need to distribute these?
if so:
2) Is there any way to build my shared library so that it's not necessary for the end user to have the C++ shared libraries?
3) What's the best way to generate a complete list of all shared libraries that are required?
Thanks,
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 11:55 AM
04-22-2003 11:55 AM
SolutionWith my experience I am trying my best to help you.
Whenever you distribute a software, you may list your dependencies (ofcourse OS is the first thing).
Mostly all Operating systems will have the necessary libraries (except development API libraries) in place if its properly installed. I dont think you can distribute libc along with your application. Copyright violation !!!!
We need to have a baseline to start our work and there comes the dependencies and you can safely assume that libc.sl will be there (ofcourse the user should have necessary patches installed).
Its the developer who should know how to build and distribute. So we should know which libraries we are linking with. Try ldd on the shared-lib/executable after building.
Hope this helps and I am not going away from what you want
cheers
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 07:54 AM
04-23-2003 07:54 AM
Re: ld: Invalid loader fixup in text space needed in output file for symbol
http://docs.hp.com/hpux/onlinedocs/2213/distributing.htm#distributing
It is a bad idea to link a shared library with either libc.a or libc.sl. You really should be depending on the a.out to be linked with the right libc.sl for your library. If you try to bring in libc.sl and the a.out didn't have it, you will just cause a dld.sl error about loading "thread local storage".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 11:13 AM
04-23-2003 11:13 AM
Re: ld: Invalid loader fixup in text space needed in output file for symbol
dynamic ../sl1/libsl1.sl
dynamic ../sl2/libsl2.sl
dynamic ../sl3/libsl3.sl
dynamic /usr/lib/librwtool.2
dynamic /usr/lib/libstd.2
dynamic /usr/lib/libstream.2
dynamic /usr/lib/libCsup.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libcl.2
dynamic /usr/lib/libc.2
static /usr/lib/libdld.2
Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 12:32 PM
04-23-2003 12:32 PM
Re: ld: Invalid loader fixup in text space needed in output file for symbol
If you create a shared library with "aCC -b" then it will not link the library with the C++ runtime libraries or libc.
You should use "aCC -b" to link shared libraries that contain C++ code. Don't use "ld -b".
If you want to create a shared library that contains aCC built code and allow it to be used by programs built and linked by cc, then you need to link in extra C++ runtime libraries as described in the link I pointed to.