Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Christ, why couldn't PE have won?


As in the Portable Executable file format? There are no tricks used in this article that rely on the specifics of ELF, unlike some more extreme examples [1] that abuse every trick in the book to shave off more bytes from executables.

If anything, PE piggybacks on top of COFF which is a complete mess of a file format. I'm currently writing a standalone library for reading and writing toolchain file formats [2] (to replace some messy bespoke code in my Ghidra extension) and this under-specified, fragmented into multiple dialects, weirdly contorted relic is a pain to deal with.

COFF was a stepping stone from a.out to ELF that should've lasted only a couple of years on Unix systems and somehow it managed to metastasize at a crucial point in time inside multiple software ecosystems, most notably Windows and indirectly .NET and UEFI through PE. Frankly, I'd ask instead why couldn't PE and COFF have lost.

[1] https://nathanotterness.com/2021/10/tiny_elf_modernized.html

[2] https://github.com/boricj/binary-file-toolkit




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: