Created
January 15, 2017 07:20
-
-
Save weldpua2008/6fa68568a0a68c816fb8c556bb7da017 to your computer and use it in GitHub Desktop.
How can I get the architecture of a binary file?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How can I get the architecture of a binary file? | |
readelf -h <archive>.a | grep 'Class\|File\|Machine' | |
[00:32:15] /usr/lib $ readelf -h libxslt.a | grep 'Class\|File\|Machine' | |
File: libxslt.a(attrvt.o) | |
Class: ELF32 | |
Machine: Intel 80386 | |
File: libxslt.a(xslt.o) | |
Class: ELF32 | |
Machine: Intel 80386 | |
... #Trimmed this, it goes on a bit | |
File: libxslt.a(transform.o) | |
Class: ELF32 | |
Machine: Intel 80386 | |
File: libxslt.a(security.o) | |
Class: ELF32 | |
Machine: Intel 80386 | |
readelf -h /home.local/stanislavp/toolchain_extracted/toolchain_extracted/usr/bin/as| grep 'Class\|File\|Machine' | |
Class: ELF64 | |
Machine: Advanced Micro Devices X86-64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment