1753730 Members
4721 Online
108799 Solutions
New Discussion юеВ

PA-RISC2.0 == 64-bit??

 
SOLVED
Go to solution
Ed Loehr
Advisor

PA-RISC2.0 == 64-bit??

Pretty basic question here, but not finding the answer via google searches...

I want to know if I'm successfully building a 64-bit executable. Here's the output:

$model
9000/800/rp8420
$uname -a
HP-UX ... B.11.23 U 9000/800 ...
$file psql
psql: PA-RISC2.0 shared executable dynamically linked -not stripped

Does this definitively identify the executable as a 64-bit executable?

On a related note, does the following definitively identify the executable as a 32-bit executable on the same box?

Thanks,
Ed

Thanks,
Ed
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: PA-RISC2.0 == 64-bit??

I don't have an 11.23 box handy to test but I don't think so. I think your message is telling your that is it is a PA2.0 instruction set with a 32-bit data model.

Here's a good way to test:

create a very baby c program:

int main()
{
(void) printf("Hello world\n");
return(0);
} /* main */

---------------------------

Now compile it:
cc +DD64 baby.c -o baby64

Compile again as:
cc +DD32 baby.c -o baby32

Now run the file command on both baby32 and baby64 and you will know.

The chatr command is a good test because chatr baby64 should explicitly tell you if it is a 64-bit executable.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: PA-RISC2.0 == 64-bit??

I believe you should see a ELF-64 in the output of the file command for a 64-bit binary.

If you don't see the ELF-64 then it is a 32-bit binary. Yours, I am almost certain, is 32-bit PA-RISC 2.0 only (not compatible with 32-bit PA-RISC 1.*).
rick jones
Honored Contributor

Re: PA-RISC2.0 == 64-bit??

The default compilation mode on PA-RISC and Itanium, regardless of 32 or 64-bit hardware, is 32-bit. Unless you are adding +DD64 to your CFLAGS, you are creating a 32-bit object.
there is no rest for the wicked yet the virtuous have no pillows