diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-24 20:37:33 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-24 20:37:33 +0530 |
| commit | fce4f25578506e18de600579fc230d50c5e7b665 (patch) | |
| tree | f14d1d1b5263dacb135a97c7a2aefca5a942ade2 /elf | |
| parent | f5f7251972748d76f9f6e0cacdcae97a303a02dc (diff) | |
Diffstat (limited to 'elf')
| -rw-r--r-- | elf/header.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/header.lua b/elf/header.lua index b289f13..3efce7b 100644 --- a/elf/header.lua +++ b/elf/header.lua @@ -35,7 +35,7 @@ function M.normalize(hdr) hdr.phoff = hdr.phoff or 0 hdr.shoff = hdr.shoff or 0 hdr.flags = hdr.flags or 0 - hdr.ehsize = hdr.ehsize or 0 + hdr.ehsize = hdr.ehsize or ((hdr.class == ec.Class.bit32) and 0x34 or 0x40) hdr.phentsize = hdr.phentsize or 0 hdr.phnum = hdr.phnum or 0 hdr.shentsize = hdr.shentsize or 0 |
