- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Linking in 64-bit mode with aCC
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
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
тАО12-11-2008 02:10 PM
тАО12-11-2008 02:10 PM
HP-UX B.11.00 U 9000/785 2001469948
-bash-2.05b$model
9000/785/C3000
-bash-2.05b$ getconf KERNEL_BITS
64
I am trying to compile some code with aCC and I am getting:
/usr/ccs/bin/ld: : Mismatched ABI. 64-bit PA object file found in 32-bit link.
I have tried with both using +DA2.0w and +DD64 in the compile flags but no use..Is there any flag for the linker as well for 64-bit.
When I pass the -v for verbose as the linker flag, one of the options that it shows is "+nosmartbind" which is 32 bit specific and this is how i know that the linker is messed up..
I also did file on the generated .o files and they are ok..
-bash-2.05b$ file Foo.o
Foo.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
and all the libraries i am using are 64 bit compiled..
Solved! Go to Solution.
- Tags:
- +DD64
- ABI mismatch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 02:38 PM
тАО12-11-2008 02:38 PM
Re: Linking in 64-bit mode with aCC
The linker uses the first object it finds to decide what "bitness" *every* object must be. All your objects and shared-libraries must be either 64-bit or 32-bit.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 03:21 PM
тАО12-11-2008 03:21 PM
Re: Linking in 64-bit mode with aCC
-bash-2.05b$ file Foo.o
Foo.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 03:55 PM
тАО12-11-2008 03:55 PM
Re: Linking in 64-bit mode with aCC
> but the first object is 64 bit
And, then, EVERY object and shared library must be 64-bit. The first object's bitness determines what the linker wants for every subsequent object.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 04:21 PM
тАО12-11-2008 04:21 PM
Re: Linking in 64-bit mode with aCC
yes that is the case, all the other objects and libraries are 64 bit...so if the first object is 64-bit, then it will use the default library search location for 64-bit libraries right?
also how can we explain the fact that i see the "+nosmartbind" in the verbose mode
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 04:50 PM
тАО12-11-2008 04:50 PM
Solution>one of the options that it shows is "+nosmartbind" which is 32 bit specific
Yes, you haven't told the driver you are doing a 64 bit link.
>JRF: The linker uses the first object it finds to decide what "bitness" *every* object must be.
The first object the driver adds is crt0.0 which would be 32 bit.
>but the first object is 64 bit as I indicated in my original post
No, the first object is what ld sees, not what you put on the driver line.
>if the first object is 64-bit, then it will use the default library search location for 64-bit libraries right?
No, the driver commands the linker to look at what it thinks is the default path.
>how can we explain the fact that I see the "+nosmartbind" in the verbose mode
You need to look at the whole -v output. Providing the output here would have helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 05:24 PM
тАО12-11-2008 05:24 PM
Re: Linking in 64-bit mode with aCC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2008 05:56 PM
тАО12-11-2008 05:56 PM
Re: Linking in 64-bit mode with aCC
This is NOT a linker option. This is a compiler driver option that you use both when compiling and linking.
Hmm, though it is obvious to me, the documentation doesn't clearly say "compiling AND linking". I'll see if I can beef this up.