- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Is it 32 or 64?
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
Forums
Discussions
Discussions
Discussions
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
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
06-25-2009 12:19 AM
06-25-2009 12:19 AM
I'm working on HP-UX hpux B.11.23 RISC.
I'm creating some exe and shared libs.
Currently my system works on 64bit (I know that by running getconf $KERNEL_BITS
Is there any way/command such that I can get info about the specific executable or sl? (on all the other env, i can do it with the "file" command.
tx,
s
Solved! Go to Solution.
- Tags:
- file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 12:40 AM
06-25-2009 12:40 AM
Re: Is it 32 or 64?
I've read this:
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2005-03/0019.html
Is it true when I run "file" on executable and get "PA-RISC2.0" then it's 64?
tx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 12:45 AM
06-25-2009 12:45 AM
Re: Is it 32 or 64?
Run a below command to check the bit
file Library_path
Regards,
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 12:48 AM
06-25-2009 12:48 AM
Re: Is it 32 or 64?
When this binary runs, it will run run in the ARIES translation environment...
for more info see:
http://www.hp.com/go/aries
For native IA64 binaries, they will be marked as 64 or 32 bit from thye file command.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 02:34 AM
06-25-2009 02:34 AM
Re: Is it 32 or 64?
No, not always. It has to say "LP64":
/stand/vmunix: ELF-64 executable object file - PA-RISC 2.0 (LP64)
/usr/lib/libc.sl: PA-RISC2.0 shared library -not stripped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 02:35 AM
06-25-2009 02:35 AM
Re: Is it 32 or 64?
when in my code I print "sizeof(long)" I accpect to get 8 if this is a 64bit, but I got 4.
what do you think? Is it even good check at all?
s.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 02:40 AM
06-25-2009 02:40 AM
Re: Is it 32 or 64?
long time... tx for the answer.
anyway, do you have some documentation for this (the LP64...)?
tx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 03:21 AM
06-25-2009 03:21 AM
SolutionIf you want to compile with 64 bit, you need to use +DD64, for HP's compilers. The default is 32 bit.
>do you have some documentation for this (the LP64)?
What type of documentation? Porting or aC++ compiler options?
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2308852bcbe02110852bcbe02110275d6e10RCRD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 04:55 AM
06-25-2009 04:55 AM
Re: Is it 32 or 64?
1. default is 32bit
2. 64bit only when "file
(I must have a reference to some HP official documentation...)
tx in advance.
s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 05:13 AM
06-25-2009 05:13 AM
Re: Is it 32 or 64?
s.
- Tags:
- gcc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 05:17 AM
06-25-2009 05:17 AM
Re: Is it 32 or 64?
> actually I'm just looking for some official documentation for what you said:
1. default is 32bit
2. 64bit only when "file
If you look at the examples titled "PA-32 and IPF 32-bit mode example" and "PA-64 and IPF 64-bit mode example" in the Linker guide or in the Programmers guide:
http://docs.hp.com/en/14640/OnlineHelp/linkerdifferencesiapa.htm
http://docs.hp.com/en/B3901-90024/B3901-90024.pdf
...you can clearly see the you must use '+DD64' to create a 64-bit object. You will also see the +DD Data Module default is explicitly ILP32 mode.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 07:17 AM
06-25-2009 07:17 AM
Re: Is it 32 or 64?
That is easy. 11.23 is a PA-RISC 64 bit only OS.
It is fully compatible with 32 bit applications.
The what, which and file command are going to reflect not the OS but how the file was compiled, created.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 08:03 AM
06-25-2009 08:03 AM
Re: Is it 32 or 64?
> actually I'm just looking for some official documentation for what you said:
2. 64bit only when "file
As noted several times, the 'file' command interprets this by examining a snippet of the file's contents and the contents of '/etc/magic':
http://docs.hp.com/en/B2355-60130/file.1.html
You might find it instructive to do:
# grep -E "PA|LP|EL" /etc/magic
...along with a 'file' command against your various executables.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 04:10 PM
06-25-2009 04:10 PM
Re: Is it 32 or 64?
You can "improve" these by removing the "$" by putting everything in (( )):
(( Y += 1 ))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2009 04:29 PM
06-25-2009 04:29 PM
Re: Is it 32 or 64?
>I'm just looking for some official documentation for what you said:
>1. default is 32bit
http://docs.hp.com/en/14487/options.htm#opt+DDdata_model
(gcc follows the HP-UX default.)
>2. 64bit only when "file
You aren't going to find this. About the best that can be done is the elfdump -f output:
$ elfdump -f /usr/lib/pa20_64/libc.sl
/usr/lib/pa20_64/libc.sl:
*** ELF Header ***
Class: ELF-64
It says "64" what more do you need?
>pls note that I'm using gcc compiler and not aC++
Then there is no official documentation.
For PA, you have to install separate 32 and 64 bit gcc compilers. For IPF, you can use -milp32 or -mlp64:
$ gcc -milp32 hi.c
$ file a.out
a.out: ELF-32 executable object file - IA64
$ gcc -mlp64 hi.c
$ file a.out
a.out: ELF-64 executable object file - IA64