Operating System - HP-UX
1834497 Members
2748 Online
110067 Solutions
New Discussion

Help finding out if a piece of code was compiled with 32 or 64 bit

 
SOLVED
Go to solution
thewho?
Frequent Advisor

Help finding out if a piece of code was compiled with 32 or 64 bit

Hello,
HPUX 11.0, 64 bit.
N4000.
A have some code that was installed long time ago and like to know if it was compiled using 64 or 32 bit libraries. Is it possible? How?
Thanks in advance.
Luis
We'll get through this together.
2 REPLIES 2
Craig Rants
Honored Contributor
Solution

Re: Help finding out if a piece of code was compiled with 32 or 64 bit

Type "file filename", that may or may not tell what the bit level is depending on how it was compiled.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Patrick Wallek
Honored Contributor

Re: Help finding out if a piece of code was compiled with 32 or 64 bit

If it is an executable, the file command should work.

Example for a 64 bit program:
# file udt
udt: ELF-64 executable object-file - PA-RISC 2.0 (LP64)

If it doesn't say ELF-64, or it is a PA-RISC 1.1, then it should be safe to assume 32-bit.