[kiosk@foundation0 Desktop]$ file /bin/passwdlinux
/bin/passwd: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x91a7160a019b7f5f754264d920e257522c5bce67, strippedios
[kiosk@foundation0 Desktop]$app
這裏的 ELF是什麼,咱們能夠參考一下網上的文檔:ui
ELF, Executable and Linking Format, 是一種用於可執行文件、目標文件、共享庫和核心轉儲的標準文件格式。 ELF格式是是UNIX系統實驗室做爲ABI(Application Binary Interface)而開發和發佈的。unix
這裏簡單介紹一下相關歷史:orm
- UNIX: 最初採用的格式爲a.out,以後被System V中的COFF取代,最後則被SVR4中的ELF格式所取代。對象
- Windows: 採用的則是COFF格式的變種PE格式blog
- MAC OS X: 採用的是Mach-O格式ip
ELF有四種不一樣的類型:開發
1. 可重定位文件(Relocatable): 編譯器和彙編器產生的.o文件,須要被Linker進一步處理
2. 可執行文件(Executable): Have all relocation done and all symbol resolved except perhaps shared library symbols that must be resolved at run time
3. 共享對象文件(Shared Object): 即動態庫文件(.so)
4. 核心轉儲文件(Core File):