Code: Select all
$ file -e elf /opt/firefox/firefox
/opt/firefox/firefox: ELF 64-bit LSB executable, x86-64, version 1 (SYSV)
$
$ readelf -h /opt/firefox/firefox
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x2018dc
Start of program headers: 64 (bytes into file)
Start of section headers: 3640 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 11
Size of section headers: 64 (bytes)
Number of section headers: 28
Section header string table index: 27
For reference see the output for LibreOffice which is installed from Debian repositories given below. Over there the output of the first command says LSB pie executable and the value of the key Type in the second command is given as DYN (Position-Independent Executable file). This indicates that the binary of LibreOffice is a PIC unlike Firefox.
Code: Select all
$ file -e elf /usr/lib/libreoffice/program/soffice.bin
/usr/lib/libreoffice/program/soffice.bin: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV)
ultramarine@satyaki:~
$ readelf -h /usr/lib/libreoffice/program/soffice.bin
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Position-Independent Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1090
Start of program headers: 64 (bytes into file)
Start of section headers: 12752 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 13
Size of section headers: 64 (bytes)
Number of section headers: 30
Section header string table index: 29