Operating System - HP-UX
1751980 Members
4800 Online
108784 Solutions
New Discussion юеВ

Re: Linking 32 and 64 bits object files

 
Chanquete
Occasional Advisor

Linking 32 and 64 bits object files

I'm working on HP-UX B.11.11 U 9000/785 (td)

I have some object files that was compilled in 32-bits mode. I lost their source code.

Now, i need to linking them in 64-bits mode. But, if i try to link different bit-mode object files, i get errors.

Are there any mode to change the 32-bits mode object files to 64-bits mode?

Thanks!
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: Linking 32 and 64 bits object files

You'll have to have the source code to compile a 64-bit executable.

You also really need the source code to verify that the code itself is correct for handling 64-bit.
A. Clay Stephenson
Acclaimed Contributor

Re: Linking 32 and 64 bits object files

There are no utilities for changing the "bitness" of an object file nor can you link mixed 32 and 64 bit object files.
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: Linking 32 and 64 bits object files

As Patrick and Clay have said, you need the source to recompile. And you still have to port the code to make sure it works correctly in 64 bit mode.
If you need some links to do 64 bit porting:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2308852bcbe02110852bcbe02110275d6e10RCRD

About the only way to use your existing objects is to wrap them in another program and use a pipe, socket, file or shared memory to pass the data back and forth between your 64 bit and 32 bit applications.

Or you can spend weekss decompiling the assembly code and then porting to 64 bit mode. ;-)