- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ld error: $global$ (data) (probably missing /usr/c...
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-16-2003 10:02 AM
тАО04-16-2003 10:02 AM
All of the shared libraries that will be used by this dynamic executable were compiled with aCC using the -c and +z options.
The interesting thing is that if I use aCC instead of ld to build the dynamic executable, it works fine. The problem with this is that the location of the shared libraries is fixed. I need to be able to use the +s option with ld so that the LD_LIBRARY_PATH can be used to set the location of the shared libraries at run-time.
If anyone has any ideas on this, I'd greatly appreciate it. I've tried just about everything ... The error message just doesn't make any sense to me.
FWIW: The file /usr/ccs/lib/crt0.o does exist ($Revision: 92453-07 linker linker crt0.o B.11.33 020617 $)
Thanks in advance..
Solved! Go to Solution.
- Tags:
- unsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2003 12:40 AM
тАО04-17-2003 12:40 AM
Re: ld error: $global$ (data) (probably missing /usr/ccs/lib/crt0.o)
And what about option '-b'?
This actually tells the linker to create share library instead of executable...
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2003 02:00 AM
тАО04-17-2003 02:00 AM
SolutionI made a little more investigation.
How about this: Make yor executable with aCC, then:
chatr +s enable $(EXE)
man chatr
quite usefull tool to postprocess.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2003 03:47 AM
тАО04-17-2003 03:47 AM
Re: ld error: $global$ (data) (probably missing /usr/ccs/lib/crt0.o)
Compiling with aCC and then using chatr works perfectly! Thanks for your help
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2003 04:54 AM
тАО04-17-2003 04:54 AM
Re: ld error: $global$ (data) (probably missing /usr/ccs/lib/crt0.o)
Adam deserves a 10 for his replies. Please assign the points and make the thread complete so that others can also see it.
thanks,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 12:58 PM
тАО09-21-2004 12:58 PM
Re: ld error: $global$ (data) (probably missing /usr/ccs/lib/crt0.o)
Bad magic number for shared library.
...
Exec format error
If I only use aCC to compile the executable, everything is just fine.
Could you please tell me how to resolve this problem?
Thanks very much!
Xin An
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 06:57 PM
тАО09-21-2004 06:57 PM
Re: ld error: $global$ (data) (probably missing /usr/ccs/lib/crt0.o)
when you dont give the compiler the '-b' option, it assumes that you want to build an executable. so when calling the linker, the compiler will include the crt0.o as the first object file in the link line. you may have missed this out when you linked using ld directly. you can use the compiler's -v flag to see what link line it uses. however it is recommended that you use the compiler for linking, unless you are very sure of what you are doing.
--
ranga
[i work for hpe]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2004 09:02 PM
тАО09-21-2004 09:02 PM
Re: ld error: $global$ (data) (probably missing /usr/ccs/lib/crt0.o)
you can pass multiple such sets of options to the linker using as many '-Wl's as you like on the compile line.
--
ranga
[i work for hpe]