Skip to content

Commit deadeba

Browse files
committed
elf: force filling the padding with zero bytes, add -orig-ids
See <armijnhemel/binaryanalysis-ng@1b88f40#diff-3a730cd59a811844bc0277c82828361ffb0b452f5739135300947f8948ae1f10> This is actually also written in the spec, see <https://man7.org/linux/man-pages/man5/elf.5.html>: ``` EI_PAD Start of padding. These bytes are reserved and set to zero. [...] ```
1 parent 1196907 commit deadeba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

executable/elf.ksy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ seq:
5757
Specifies which OS- and ABI-related extensions will be used
5858
in this ELF file.
5959
- id: abi_version
60+
-orig-id: e_ident[EI_ABIVERSION]
6061
type: u1
6162
doc: |
6263
Version of ABI targeted by this ELF file. Interpretation
6364
depends on `abi` attribute.
6465
- id: pad
65-
size: 7
66+
-orig-id: e_ident[EI_PAD]..e_ident[EI_NIDENT - 1]
67+
contents: [0, 0, 0, 0, 0, 0, 0]
6668
- id: header
6769
type: endian_elf
6870
instances:

0 commit comments

Comments
 (0)