Is a shared object compiled for a 32-bit or 64-bit machine?

Is there a command on Linux that we can run on a compiled shared object (.so) in / usr / lib and know if it is compiled for a 64-bit or 32-bit system? (I mean the ELF class, for example ELFCLASS32)

+4
source share
1 answer

You can use the command file. For instance:.

[myuser@mycomputer]$ file /usr/lib/libcurl.so.4.1.1 
/usr/lib/libcurl.so.4.1.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
+7
source

Source: https://habr.com/ru/post/1543609/


All Articles