First, view the system 32 or 64-bit system bootinfo-y View the number of hardware bits
Bootinfo-k View kernel digits
Second, view the library file is 32-bit or 64-bit
1. Use the file command
Linux:
# file Libnss1_files-2.2.4.so
Libnss1_files-2.2.4.so:elf 32-bit LSB Shared object, Intel 80386, version 1, not stripped
# file Libtrsbean.so
Libtrsbean.so:ELF 64-bit LSB Shared Object, version 1, not stripped
no description of the AIX:32 bit
#file/USR/CCS/LIB/MCRT0.O
/usr/ccs/lib/mcrt0.o:executable (RISC system/6000) or object module not stripped
#file/USR/CCS/LIB/MCRT0_64.O
/usr/ccs/lib/mcrt0_64.o:64-bit Xcoff executable or object module not stripped
Solaris:
# file Libmp.so
Libmp.so:ELF 32-bit MSB Dynamic Library SPARC version 1, dynamic link, no removal
2, through the binary view command OD View related library files can also solve this problem, but difficult, nor insurance. The following results are given in different systems for reference (due to tests made under only one version of the operating system, the following results cannot be adapted to all versions of the system) Linux
The 32-digit 4th paragraph is 0101; 64-digit 4th is 0102.
-H means 16-in-2-byte integer view, integer high and low bit adjusted (such as 7f45 to 457f);-N 10 means view 10 bytes
#od-H-N 32.so
0000000 457f 464c 0101 0001 0000
#od-H-N 64.so
0000000 457f 464c 0102 0001 0000 Solaris
Similar to Linux, only the Linux-h parameter becomes-X. In addition, the results are not the same, Solaris is displayed in byte order, Linux is viewed in 16-in-2-byte integers, and the high-low level is adjusted.
#od-X-N 32.so
0000000 7f45 4c46 0101 0100 0000
#od-X-N 64.so
0000000 7f45 4c46 0102 0100 0000 AIX
32 bits is 01DF; 64 is 01f7.
#od-N 10-h crt0_r.o
0000000 01df 0003 3d65 462a 0000
#od-N 10-h mcrt0_64.o
0000000 01f7 0003 3fe2 7fd5 0000
HP Unix
There is no actual operation, just open two files via UltraEdit xxx32.sl and XXX64.SL and compare the first few bytes (HP library file is. SL end is not. So). Found 64-bit files similar to Linux/solaris's.
0e 05 12 40
7f 4c Reference: http://blog.csdn.net/coolmasoft/article/details/3168838