Template patchELFPHDRTable, rewriteNoteSections, markGnuRelroSections, and discoverStorage to support both ELF32LE and ELF64LE binaries. Previously these functions were hardcoded for ELF64LE, causing crashes when processing 32-bit ELF binaries. The RewriteInstance constructor now accepts ELF32LE objects in addition to ELF64LE. The ELF_FUNCTION macro is reused (and moved earlier in the header) to dispatch to the correct template instantiation. These changes are preparation for adding support to hexagon architecture in Bolt.
13 lines
243 B
YAML
13 lines
243 B
YAML
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
Machine: EM_ARM
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [SHF_ALLOC, SHF_EXECINSTR]
|
|
Address: 0x10000
|
|
Content: '00000000'
|