http://www.linker-aliens.org/blogs/ali/entry/gnu_hash_elf_sections/
https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-48031.html
Public Functions
Return the number of buckets used.
Return the number of chain used.
Buckets values.
Chains values.
Class which represents an ELF note. This class can be instantiated using the static Note::create functions.
Subclassed by LIEF::ELF::AndroidIdent, LIEF::ELF::CoreAuxv, LIEF::ELF::CoreFile, LIEF::ELF::CorePrPsInfo, LIEF::ELF::CorePrStatus, LIEF::ELF::CoreSigInfo, LIEF::ELF::NoteAbi, LIEF::ELF::NoteGnuProperty, LIEF::ELF::QNXStack
Public Types
LIEF representation of the ELF NT_
values.
Values:
Match NT_HWCAP
: Synthetic hardware capabilities information.
Match NT_GNU_BUILD_ID
: Unique build ID as generated by the GNU ld.
Match NT_GNU_GOLD_VERSION
: The version of gold used to link.
Match NT_GNU_PROPERTY_TYPE_0
: Program property note, as described in “Linux Extensions to the gABI”.
Crashpad note used by the Chromium project.
Coredump that wraps the elf_prstatus
structure.
Coredump that wraps the elf_prpsinfo
structure.
See: CorePrPsInfo
Coredump that contains a copy of all the auxiliary vectors (auxv)
See: CoreAuxv
Coredump that wraps the fpregset
structure.
Coredump that wraps the psinfo
structure.
Note that is specific to Android and that describes information such as the NDK version or the SDK build number.
See AndroidIdent
Container used to handle the description data.
Public Functions
Clone the current note and keep its polymorphic type.
Return the name of the note (also known as ‘owner’ )
Return the section name in which the note is or should be stored.
Return the type of the note. This type does not match the NT_
type value. For accessing the original NT_
value, check original_type()
The original NT_xxx
integer value. The meaning of this value likely depends on the owner of the note.
Return the description associated with the note.
Change the description of the note.
Size of the raw note which includes padding.
Public Static Functions
Convert the raw integer note type into a TYPE according to the owner.
Try to determine the ELF section name associated with the TYPE provided in parameter.
Try to determine the owner’s name of the TYPE provided in parameter.
Create a new note from the given parameters. Additional information such as the architecture or the ELF class could be required for creating notes like Coredump notes.
Create a new note from the given parameters. Additional information such as the architecture or the ELF class could be required for creating notes like Coredump notes.
Create a new note from the given stream. Additional information such as the architecture or the ELF class could be required for creating notes like Coredump notes.
Class representing the NT_PRPSINFO core note. This kind of note represents general information about the process.
Public Functions
Clone the current note and keep its polymorphic type.
Friends
Public Functions
Initial part of the arguments.
Return the filename without the ending \x00
Return the args without the ending \x00
Public Members
Numeric process state.
printable character representing state
Whether the process is a zombie.
Nice value.
Process flag.
Process user ID.
Process group ID.
Process ID.
Process parent ID.
Process group.
Process session id.
Filename of the executable.
Class representing a core NT_FILE
which describes the mapped files of the process.
Public Types
Public Functions
Clone the current note and keep its polymorphic type.
Number of coredump file entries.
Class representing core PrPsInfo object.
Public Functions
Clone the current note and keep its polymorphic type.
Return the pr_status_t structure.
The value of the register that holds the return value according to the calling convention.
Get the value for the given X86 register or return an error.
Get the value for the given X86_64 register or return an error.
Get the value for the given ARM register or return an error.
Get the value for the given AARCH64 register or return an error.
A list of the register values. This list is guarantee to be as long as the Registers::ARM::_COUNT or empty if it can’t be resolved. Thus, one can access a specific register with:
if (architecture() == ARCH::AARCH64) {
auto reg_vals = register_values()
if (!reg_vals.empty()) {
auto x20 = reg_vals[static_cast<size_t>(Register::AARCH64::X20)]
}
}
Friends
Public Types
Register for the x86 architecture (ARCH::I386).
Values:
Register for the x86-64 architecture (ARCH::X86_64).
Values:
Register for the ARM architecture (ARCH::ARM).
Values:
Register for the AARCH64 architecture (ARCH::AARCH64).
Values:
Class representing a core siginfo object.
Public Functions
Clone the current note and keep its polymorphic type.
Friends
Class representing core auxv object.
Public Types
Values:
End of vector
Entry should be ignored
File descriptor of program
Program headers for program
Size of program header entry
Number of program headers
System page size
Base address of interpreter
Flags
Entry point of program
Program is not ELF
Real uid
Effective uid
Real gid
Effective gid
String identifying platform.
Machine dependent hints about processor capabilities.
Frequency of times()
Used FPU control word.
Data cache block size.
Instruction cache block size.
Instruction cache block size.
Entry should be ignored.
Boolean, was exec setuid-like?.
String identifying real platform
Address of 16 random bytes
Extension of AT_HWCAP
Filename of executable
Filename of executable
Pointer to ELF header of system-supplied DSO.
Public Functions
Clone the current note and keep its polymorphic type.
A map of CoreAuxv::TYPE and the value.
Return the value associated with the provided TYPE or a lief_errors::not_found if the type is not present.
Class representing the “.note.android.ident” section.
Public Functions
Clone the current note and keep its polymorphic type.
Target SDK version (or 0 if it can’t be resolved)
NDK version used (or an empty string if it can’t be parsed)
NDK build number (or an empty string if it can’t be parsed)
Public Static Functions
Public Static Attributes
Friends
Class representing the QNX QNT_STACK
note.
Public Functions
Clone the current note and keep its polymorphic type.
Size of the stack.
Size of the stack pre-allocated (upfront)
Whether the stack is executable.
Class that wraps the NT_GNU_ABI_TAG
note.
Public Types
ABI recognized by this note.
Values:
Version type: (Major, Minor, Patch)
Public Functions
Clone the current note and keep its polymorphic type.
Public Static Functions
Class that wraps the NT_GNU_PROPERTY_TYPE_0
note.
Public Types
Public Functions
Clone the current note and keep its polymorphic type.
Find the property with the given type or return a nullptr
Return the properties as a list of Property.
Friends
This class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0
note.
Subclassed by LIEF::ELF::AArch64Feature, LIEF::ELF::AArch64PAuth, LIEF::ELF::Generic, LIEF::ELF::Needed, LIEF::ELF::NoteNoCopyOnProtected, LIEF::ELF::StackSize, LIEF::ELF::X86Features, LIEF::ELF::X86ISA
Public Types
LIEF’s mirror types of the original GNU_PROPERTY_
values.
Values:
Mirror of GNU_PROPERTY_AARCH64_FEATURE_1_AND
Mirror of GNU_PROPERTY_AARCH64_FEATURE_PAUTH
Mirror of GNU_PROPERTY_STACK_SIZE
Mirror of GNU_PROPERTY_NO_COPY_ON_PROTECTED
Mirror of GNU_PROPERTY_X86_ISA_1_*
and GNU_PROPERTY_X86_COMPAT_*
Mirror of GNU_PROPERTY_X86_FEATURE_*
This class represents a property which doesn’t have a concrete LIEF implementation.
Public Functions
The original raw type as an integer. This value might depends on the architecture and/or the file type.
Public Static Functions
This class represents the GNU_PROPERTY_AARCH64_FEATURE_1_AND
property.
Public Types
Public Functions
Public Static Functions
This class represents the GNU_PROPERTY_AARCH64_FEATURE_PAUTH
property.
Note
If both: AArch64PAuth::platform and AArch64PAuth::version are set to 0, this means that the binary is incompatible with PAuth ABI extension.
Public Functions
64-bit value that specifies the platform vendor.
A 0
value is associated with an invalid platform while the value 1
is associated with a baremetal platform.
64-bit value that identifies the signing schema used by the ELF file.
Public Static Functions
This class provides an interface over the GNU_PROPERTY_NO_COPY_ON_PROTECTED
property. This property indicates that the linker shouldn’t copy relocations against protected symbols.
Public Functions
Public Static Functions
This class provides an interface over the GNU_PROPERTY_STACK_SIZE
property.
This property can be used by the loader to raise the stack limit.
Public Functions
The indicated stack size.
Public Static Functions
This class interfaces the different GNU_PROPERTY_X86_FEATURE_*
properties which includes:
GNU_PROPERTY_X86_FEATURE_1_AND
GNU_PROPERTY_X86_FEATURE_2_USED
GNU_PROPERTY_X86_FEATURE_2_NEEDED
Public Types
Flag according to the _AND
, _USED
or _NEEDED
suffixes.
Values:
For the original GNU_PROPERTY_X86_FEATURE_1_AND
property.
For the original GNU_PROPERTY_X86_FEATURE_2_USED
property.
For the original GNU_PROPERTY_X86_FEATURE_2_NEEDED
property.
Features provided by these different properties.
Values:
List of the features as a pair of FLAG, FEATURE.
For instance, if the raw property is GNU_PROPERTY_X86_FEATURE_2_USED
with a bitmask set to GNU_PROPERTY_X86_FEATURE_2_XSAVE
, it generates the pair: FLAG::USED, FEATURE::XSAVE
Public Functions
List of the features.
Public Static Functions
This class interfaces the different GNU_PROPERTY_X86_ISA_*
properties which includes:
GNU_PROPERTY_X86_ISA_1_USED
GNU_PROPERTY_X86_ISA_1_NEEDED
GNU_PROPERTY_X86_COMPAT_ISA_1_USED
GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED
GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED
GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED
Public Types
Values:
Public Static Functions
Class which takes an ELF::Binary object and reconstructs a valid binary.
This interface assumes that the layout of input ELF binary is correct (i.e. the binary can run).
Public Functions
Perform the build of the provided ELF binary.
Return the built ELF binary as a byte vector.
Write the built ELF binary in the filename
given in parameter.
Write the built ELF binary in the stream os
given in parameter.
Configuration options to tweak the building process.
Public Members
Rebuild DT_HASH.
Rebuild DT_STRTAB.
Rebuild PT_DYNAMIC segment.
Rebuild DT_FINI_ARRAY.
Rebuild DT_GNU_HASH.
Rebuild DT_INIT_ARRAY.
Rebuild PT_INTERPRETER.
Rebuild DT_JMPREL.
Disable note building since it can break the default layout.
Rebuild DT_PREINIT_ARRAY.
Rebuild DT_RELR.
Rebuild DT_ANDROID_REL[A].
Rebuild DT_REL[A].
Rebuild .symtab
Rebuild DT_VERDEF.
Rebuild DT_VERNEED.
Rebuild DT_VERSYM.
Rebuild DT_SYMTAB.
Rebuild the Coredump notes.
Check if the given file is an ELF one.
check if the raw data is a ELF file
Machine architectures See current registered ELF machine architectures at: http://www.sco.com/developers/gabi/latest/ch4.eheader.html
Values:
No machine
AT&T WE 32100
SPARC
Intel 386
Motorola 68000
Motorola 88000
Intel MCU
Intel 80860
MIPS R3000
IBM System/370
MIPS RS3000 Little-endian
Hewlett-Packard PA-RISC
Fujitsu VPP500
Enhanced instruction set SPARC
Intel 80960
PowerPC
PowerPC64
IBM System/390
IBM SPU/SPC
NEC V800
Fujitsu FR20
TRW RH-32
Motorola RCE
ARM
DEC Alpha
Hitachi SH
SPARC V9
Siemens TriCore
Argonaut RISC Core
Hitachi H8/300
Hitachi H8/300H
Hitachi H8S
Hitachi H8/500
Intel IA-64 processor architecture
Stanford MIPS-X
Motorola ColdFire
Motorola M68HC12
Fujitsu MMA Multimedia Accelerator
Siemens PCP
Sony nCPU embedded RISC processor
Denso NDR1 microprocessor
Motorola Star*Core processor
Toyota ME16 processor
STMicroelectronics ST100 processor
Advanced Logic Corp. TinyJ embedded processor family
AMD x86-64 architecture
Sony DSP Processor
Digital Equipment Corp. PDP-10
Digital Equipment Corp. PDP-11
Siemens FX66 microcontroller
STMicroelectronics ST9+ 8/16 bit microcontroller
STMicroelectronics ST7 8-bit microcontroller
Motorola MC68HC16 Microcontroller
Motorola MC68HC11 Microcontroller
Motorola MC68HC08 Microcontroller
Motorola MC68HC05 Microcontroller
Silicon Graphics SVx
STMicroelectronics ST19 8-bit microcontroller
Digital VAX
Axis Communications 32-bit embedded processor
Infineon Technologies 32-bit embedded processor
Element 14 64-bit DSP Processor
LSI Logic 16-bit DSP Processor
Donald Knuth’s educational 64-bit processor
Harvard University machine-independent object files
SiTera Prism
Atmel AVR 8-bit microcontroller
Fujitsu FR30
Mitsubishi D10V
Mitsubishi D30V
NEC v850
Mitsubishi M32R
Matsushita MN10300
Matsushita MN10200
picoJava
OpenRISC 32-bit embedded processor
ARC International ARCompact processor (old spelling/synonym: EM_ARC_A5)
Tensilica Xtensa Architecture
Alphamosaic VideoCore processor
Thompson Multimedia General Purpose Processor
National Semiconductor 32000 series
Tenor Network TPC processor
Trebia SNP 1000 processor
STMicroelectronics (www.st.com) ST200
Ubicom IP2xxx microcontroller family
MAX Processor
National Semiconductor CompactRISC microprocessor
Fujitsu F2MC16
Texas Instruments embedded microcontroller msp430
Analog Devices Blackfin (DSP) processor
S1C33 Family of Seiko Epson processors
Sharp embedded microprocessor
Arca RISC Microprocessor
Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University
eXcess: 16/32/64-bit configurable embedded CPU
Icera Semiconductor Inc. Deep Execution Processor
Altera Nios II soft-core processor
National Semiconductor CompactRISC CRX
Motorola XGATE embedded processor
Infineon C16x/XC16x processor
Renesas M16C series microprocessors
Microchip Technology dsPIC30F Digital Signal
Freescale Communication Engine RISC core
Renesas M32C series microprocessors
Altium TSK3000 core
Freescale RS08 embedded processor
Analog Devices SHARC family of 32-bit DSP
Cyan Technology eCOG2 microprocessor
Sunplus S+core7 RISC processor
New Japan Radio (NJR) 24-bit DSP Processor
Broadcom VideoCore III processor
RISC processor for Lattice FPGA architecture
Seiko Epson C17 family
The Texas Instruments TMS320C6000 DSP family
The Texas Instruments TMS320C2000 DSP family
The Texas Instruments TMS320C55x DSP family
STMicroelectronics 64bit VLIW Data Signal Processor
Cypress M8C microprocessor
Renesas R32C series microprocessors
NXP Semiconductors TriMedia architecture family
Qualcomm Hexagon processor
Intel 8051 and variants
STMicroelectronics STxP7x family of configurable
Cyan Technology eCOG1X family
Cyan Technology eCOG1X family
Dallas Semiconductor MAXQ30 Core Micro-controllers
New Japan Radio (NJR) 16-bit DSP Processor
M2000 Reconfigurable RISC Microprocessor
Cray Inc. NV2 vector architecture
Renesas RX family
Imagination Technologies META processor
MCST Elbrus general purpose hardware architecture
Cyan Technology eCOG16 family
National Semiconductor CompactRISC CR16 16-bit
Freescale Extended Time Processing Unit
Infineon Technologies SLE9X core
Intel L10M
Intel K10M
ARM AArch64
Atmel Corporation 32-bit microprocessor family
STMicroeletronics STM8 8-bit microcontroller
Tilera TILE64 multicore architecture family
Tilera TILEPro multicore architecture family
NVIDIA CUDA architecture
Tilera TILE-Gx multicore architecture family
CloudShield architecture family
KIPO-KAIST Core-A 1st generation processor family
KIPO-KAIST Core-A 2nd generation processor family
Synopsys ARCompact V2
Open8 8-bit RISC soft processor core
Renesas RL78 family
Broadcom VideoCore V processor
Renesas 78KOR family
Freescale 56800EX Digital Signal Controller (DSC)
Beyond BA1 CPU architecture
Beyond BA2 CPU architecture
XMOS xCORE processor family
Microchip 8-bit PIC(r) family
Reserved by Intel
Reserved by Intel
Reserved by Intel
Reserved by Intel
Reserved by Intel
KM211 KM32 32-bit processor
KM211 KMX32 32-bit processor
KM211 KMX16 16-bit processor
KM211 KMX8 8-bit processor
KM211 KVARC processor
Paneve CDP architecture family
Cognitive Smart Memory Processor
iCelero CoolEngine
Nanoradio Optimized RISC
CSR Kalimba architecture family
AMD GPU architecture
RISC-V
eBPF Filter
C-SKY
LoongArch
Values: