Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

file - 32 or 64 bit?

130 views
Skip to first unread message

Patrick Finnegan

unread,
Jun 29, 2007, 1:23:05 PM6/29/07
to

I thought the file command would tell me whether a file was 32 or 64
bit.

file java
java: executable (RISC System/6000) or object module not stripped

??

Mark Taylor

unread,
Jun 29, 2007, 2:32:33 PM6/29/07
to
On Jun 29, 6:23 pm, Patrick Finnegan <finnegan.patr...@gmail.com>
wrote:

try

# java -version
# what /usr/bin/java ## or whatever the path is to the binary you want
to investigatge
or
# lslpp -w /usr/bin/java ## to find the lpp and get some sort of
description from the lpp package that it is a part of

HTH
Mark Taylor

Lőrinczy Zsigmond

unread,
Jun 30, 2007, 3:32:09 AM6/30/07
to

As far as I remember, this means 32-bit executable,
you get something else for 64-bit executables... just try it

Patrick Finnegan

unread,
Jul 2, 2007, 5:19:29 AM7/2/07
to


I get the same result for other executables.

file lcfd
lcfd: executable (RISC System/6000) or object module

file zcat
zcat: executable (RISC System/6000) or object module


The os is 64 bit.

lslpp -l bos.64bit

Fileset Level State Description

----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.64bit 5.2.0.75 COMMITTED Base Operating System
64 bit
Runtime

Path: /etc/objrepos
bos.64bit 5.2.0.50 COMMITTED Base Operating System
64 bit
Runtime

I should get something like this.

# file $ORACLE_HOME/bin/oracle

If the executable is 32-bit, the result is

oracle: executable (RISC System/6000) or object module not =
stripped

for 64-bit ocde

oracle: 64-bit AIX executable or object module not stripped

Tried the file command on the unix directory and this shows 32 bit and
64 bit.

file /usr/lib/boot/unix*
/usr/lib/boot/unix: 64-bit XCOFF executable or object module not
stripped
/usr/lib/boot/unix_64: 64-bit XCOFF executable or object module not
stripped
/usr/lib/boot/unix_mp: executable (RISC System/6000) or object module
not stripped
/usr/lib/boot/unix_up: executable (RISC System/6000) or object module
not stripped

Anyway the other system commands indicate that the os is 64 bit. It
seems that the app software installed is 32 bit.

Thanks.

David Luner

unread,
Jul 2, 2007, 1:27:28 PM7/2/07
to
On Mon, 02 Jul 2007 09:19:29 -0000, Patrick Finnegan
<finnegan...@gmail.com> wrote:

> [Stuff about finding out if an object module, specifically java, is 32 or 64 bit ]

As was stated earlier, the file command does output something
different for 64-bit modules.

While IBM (as part of WebSphere) can have a 64-bit Java environment,
there are *significant* performance implications and system resource
requirements. Unless your application *needs* the heap space that a
64-bit implementation provides, you are really better off without it.

See
http://www.ibm.com/developerworks/websphere/techjournal/0612_col_alcott/0612_col_alcott.html
and related documents.

The IBM Java runs multiple threads. If there's only one thread active,
it's scheduled by AIX on only one processor. If you have a 16-way
system, you will only see "all processors equally active" if you have
16 threads that are runnable.

-- David

Lőrinczy Zsigmond

unread,
Jul 4, 2007, 2:09:56 PM7/4/07
to
> /usr/lib/boot/unix: 64-bit XCOFF executable or object module
> /usr/lib/boot/unix_mp: executable (RISC System/6000) or object module

That's it. When compiling with gcc use options '-maix32' or '-maix64'
to select output-type.
Of course some datatypes have different sizes, programmers should be
carefull.

type 32-bit 64-bit
-----------------------
short 16 16
int 32 32
long 32 64
long long 64 64
size_t 32 64
void * 32 64
ptrdiff_t 32 64

0 new messages