Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ How to find out a Unix system library files are 32-bit or 64-bit     - Offline (local) Yum source structures (Linux)

- Use C program in JavaScript (Programming)

- Linux dynamic libraries and Guide (Programming)

- Sublime Text 3 shortcuts summary (Linux)

- 64-bit Oracle Linux recompiled Hadoop-2.2.0 (Server)

- ASP.NET 5 is connected with the Redis server on the Linux platform (Server)

- Linux foundation tutorial: how to modify the host name on CentOS or RHEL 7 (Linux)

- Inherent limitations of Linux systems network security (Linux)

- Ubuntu 12.04 installation DHCP Server (Server)

- Android will save the picture to see the album and timely (Programming)

- Security Knowledge: redirection command application security (Linux)

- Debian 7.8 system installation and configuration process (Linux)

- Linux how to view the graphics models notebook (Linux)

- After VMware CentOS full VM clone the network card is unavailable Solutions (Linux)

- Ubuntu 15.04 / 14.04 install Ubuntu After Install 2.6 (Linux)

- Notebook computer forget password solution (Linux)

- Ubuntu users to install the system indicator SysPeek 0.3 (Linux)

- Ubuntu uses conky add desktop control (Linux)

- It is time to upgrade your gulp 4.0 (Programming)

- Java Virtual Machine class loading mechanism and bytecode execution engine (Programming)

  How to find out a Unix system library files are 32-bit or 64-bit
  Add Date : 2018-11-21      
  Sometimes, we need to know the number of bits of the operating system, or configure the plug when the main program needs to know the number of bits (for example, configuration apache widget when you need to know in order to configure the number of bits apache plugin) The easiest way is to execute file commands, such as:

file command


# File libnss1_files-2.2.4.so
libnss1_files-2.2.4.so: ELF 32-bit LSB shared object, Intel80386, version 1, not stripped
# File libtrsbean.so
libtrsbean.so: ELF 64-bit LSB shared object, version 1, not stripped

32 not stated

#file /usr/ccs/lib/mcrt0.o
/usr/ccs/lib/mcrt0.o: executable (RISC System / 6000) orobjectmodulenot stripped
#file /usr/ccs/lib/mcrt0_64.o
/usr/ccs/lib/mcrt0_64.o: 64-bit XCOFF executable orobjectmodulenot stripped

# File libmp.so
libmp.so: ELF 32- bit MSB dynamic libraries SPARC version 1, dynamically linked, not removed
od command

Further od command via binary view view libraries can also resolve this problem, but it is difficult, not insurance. The results are given below in the different systems, for reference (because only in a version of the operating system to do the following test, the following results can not accommodate all versions of all systems)


32 paragraph 4 is 0101; 64, paragraph 4 is 0102. -h represented by hexadecimal 2-byte integer view, low bit integer also adjusted (eg 7f45 become 457f); -N 10 represents 10 bytes of view.

#od -h -N 10 32.so
      0000000457f464c 0101 00010000
#od -h -N 10 64.so
      0000000457f464c 0102 0001 0000

And Linux is almost, but the Linux -h parameter becomes -x. In addition the results are not the same, Solaris is in accordance with the byte order shown, Linux is based on 2-byte integer hexadecimal view, we will adjust the high and low.

#od -x -N 10 32.so
#od -x -N 10 64.so

32 is 01df; 64 bits are 01f7

#od -N 10 -h crt0_r.o
    0000000 01df 00033d65462a0000
#od -N 10 -h mcrt0_64.o
      0000000 01f7 00033fe27fd50000
HP Unix

No practice, just open two files by UltraEdit xxx32.sl and xxx64.sl and comparing the first few bytes (HP library file is .sl not end .so ending). Similar findings were 64 files and Linux / Solaris is.

- Virtual Judge structures under Ubuntu 14.04 (Server)
- Setup Qt development environment under Linux (Linux)
- SpringMVC garbage processing (Programming)
- HDFS Hadoop Distributed File System Works (Server)
- Android Dynamic efficiency articles: a brilliant Loading Analysis and Implementation (Programming)
- The top command under Linux (Linux)
- Linux fast set ip bond (Linux)
- Linux automatic installation and implementation (Linux)
- LinkedList Basic Usage (Programming)
- a virtual machine created migrated to host RHEL6.4 on Ubuntu 14.04 (Linux)
- Sleuth Kit: used to analyze a disk image and restore files open source forensics tools (Linux)
- MySQL and MariaDB traditional master-slave cluster configuration (Database)
- Usage of sudo (Linux)
- Disk partition MBR (Linux)
- Python object-oriented programming (Programming)
- Good wireless network security information spread in the air (Linux)
- Linux System Getting Started Tutorial: mounted directly in Linux LVM partition (Linux)
- Shell script to delete empty folders recursively (Linux)
- Linux System Getting Started Tutorial: Installing Brother printer in Linux (Linux)
- Solve the compatibility problem between Linux and Java at the source in bold font (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.