diff options
Diffstat (limited to 'elf/header.lua')
| -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 |
