1829822 Members
2202 Online
109993 Solutions
New Discussion

32 bit ?? 64 bit???

 
SOLVED
Go to solution

32 bit ?? 64 bit???

How do U identify an application in unix, if its 32 bit or 64 bit.

What commant / Utility helps u to find this out.
4 REPLIES 4
H.Merijn Brand (procura
Honored Contributor
Solution

Re: 32 bit ?? 64 bit???

From the FAQ on my HP ITRC site pages found at

Singapore https://www.beepz.com/personal/merijn/#FAQ
Rotterdam http://www.cmve.net/~merijn/#FAQ
Seattle http://ww.hpux.ws/merijn/#FAQ

you can read:

--8<---
Does my system support 64bit builds

You can find out if your kernel supports 64bit binaries by issuing:

a5:/usr/local 110 > file /stand/vmunix
/stand/vmunix: ELF-64 executable object file - PA-RISC 2.0 (LP64)
a5:/usr/local 111 > getconf KERNEL_BITS
64
a5:/usr/local 112 > getconf HW_32_64_CAPABLE
1
a5:/usr/local 113 >

HP-UX 10.20 does not support 64bit objects
How can I see if my program is a 64bit object?

a5:/usr/local 108 > file pa*/bin/gcc
pa11_32/bin/gcc: PA-RISC1.1 shared executable dynamically linked -not stripped
pa20_32/bin/gcc: PA-RISC2.0 shared executable dynamically linked -not stripped
pa20_64/bin/gcc: ELF-64 executable object file - PA-RISC 2.0 (LP64)
a5:/usr/local 109 >
How can I see how my binary was compiled?

Provided your binary isn't stripped, and it is 32bit SOM that info should be reveiled with odump -compunit

Provided your binary isn't stripped, and it is 64bit ELF (LP64) that info should be reveiled with elfdump -dc
Do I need 64bit gcc?

You only need 64bit gcc if you have to build 64bit binaries. gcc/64 cannot build 32bit binaries, so if you need both, you need two versions/builds of gcc
Do I need a 64bit build of perl?

In general, no. You only need a 64bit build of perl when you have to link to 64bit objects/libraries of other applications, such as Oracle. 32bit build Oracle does not play nice with 64bit build of perl or the other way round.
-->8---

and lots more

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn

Re: 32 bit ?? 64 bit???

Hi,
I want to know if the installed apps is 32 bit or 64 bit.
I am not asking abt the support of 32bit or 64 bit
H.Merijn Brand (procura
Honored Contributor

Re: 32 bit ?? 64 bit???

Well, that info is included in above snippet:

--8<---
a5:/usr/local 108 > file pa*/bin/gcc
pa11_32/bin/gcc: PA-RISC1.1 shared executable dynamically linked -not stripped
pa20_32/bin/gcc: PA-RISC2.0 shared executable dynamically linked -not stripped
pa20_64/bin/gcc: ELF-64 executable object file - PA-RISC 2.0 (LP64)
a5:/usr/local 109 >
How can I see how my binary was compiled?

Provided your binary isn't stripped, and it is 32bit SOM that info should be reveiled with odump -compunit

Provided your binary isn't stripped, and it is 64bit ELF (LP64) that info should be reveiled with elfdump -dc
-->8---

Your application is 64bit if you see ELF64 or LP64

the utils are 'file', 'odump', and 'elfdump'

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Joseph Loo
Honored Contributor

Re: 32 bit ?? 64 bit???

hi,

do

#file ''

if returns ELF-64 executable object, it is 64bit.

if returns something like PA-RISC2.0 shared executable, it is 32bit.

regards.
what you do not see does not mean you should not believe