[PATCH] D44225: Fix identification of COFF executable files
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 14:07:46 PST 2018
inglorion added a comment.
How expensive is it to MemoryBuffer::getFilePath() in all cases? Unless we have reason to believe it is expensive, I would say let's just do that, and then we can remove the code that reads the 32 bytes and detect PE/COFF executables properly.
I took a look at http://cvsweb.netbsd.org/bsdweb.cgi/src/external/bsd/file/dist/magic/magdir/msdos?rev=1.1.1.10&content-type=text/x-cvsweb-markup&only_with_tag=MAIN to see what file does, and that also looks for the PE header to determine if this is a PE/COFF executable.
https://reviews.llvm.org/D44225
More information about the llvm-commits
mailing list