Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22048

Determine if a compiled ELF object is 32-bit or 64-bit

$
0
0

I want to verify if an object has been compiled in 32-bit or 64-bit:

% readelf -h my_obj
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  ...

Since ELF32 is displayed, does this guarantee that the object is in 32-bit mode?


Viewing all articles
Browse latest Browse all 22048

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>