summaryrefslogtreecommitdiffstats
path: root/llvm/lib/BinaryFormat/Magic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove @brief commands from doxygen comments, too.Adrian Prantl2018-05-011-1/+1
| | | | | | | | | | | | | | | | | This is a follow-up to r331272. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done https://reviews.llvm.org/D46290 llvm-svn: 331275
* Fix detection of COFF executable files.Zachary Turner2018-03-081-8/+6
| | | | | | | | | | | | One overload of this function would try to identify a file by opening it and using the first 32 bytes to identify the magic of the file. This didn't work properly when more than 32 bytes is actually needed for magic detection to succeed. So now we have this overload read in the entire file. Differential Revision: https://reviews.llvm.org/D44225 llvm-svn: 327050
* Teach identify_file_magic to identify PDB files.Zachary Turner2018-03-071-1/+3
| | | | llvm-svn: 326924
* Simplify.Rafael Espindola2017-10-191-2/+2
| | | | llvm-svn: 316144
* Fix buffer overflow.Rafael Espindola2017-10-191-1/+1
| | | | | | We were reading past the end of the buffer. llvm-svn: 316143
* [BinaryFormat] Fix out of bounds read.Benjamin Kramer2017-08-311-1/+1
| | | | | | | Found by OSS-FUZZ! https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3220 llvm-svn: 312238
* Revert "Revert "Revert "Revert "Switch external cvtres.exe for llvm's own ↵Eric Beckmann2017-07-081-1/+2
| | | | | | | | | | | | | | | | | | | | resource library."""" This reverts commit 147f45ff24456aea59575fa4ac16c8fa554df46a. Revert "Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file."""" This reverts commit 61a90a67ed54a1f0dfeab457b65abffa129569e4. The patches were intially reverted because they were causing a failure on CrWinClangLLD. Unfortunately, this was done haphazardly and didn't compile, so the revert was reverted again quickly to fix this. One that was done, the revert of the revert was itself reverted. This allowed me to finally fix the actual bug in r307452. This patch re-enables the code path that had originally been causing the bug, now that it (should) be fixed. llvm-svn: 307460
* Revert "Revert "Revert "Replace trivial use of external rc.exe by writing ↵Eric Beckmann2017-07-051-2/+1
| | | | | | | | | | | | | | our own .res file.""" This reverts commit 5fecbbbe5049665d86834cf69d8f75db4f392308. The initial revert was done in order to prevent ongoing errors on chromium bots such as CrWinClangLLD. However, this was done haphazardly and I didn't realize there were test and compilation failures, so this revert was reverted. Now that those have been fixed, we can revert the revert of the revert. llvm-svn: 307226
* Revert "Revert "Replace trivial use of external rc.exe by writing our own ↵Eric Beckmann2017-07-051-1/+2
| | | | | | | | .res file."" This reverts commit 8c8dce3b8f15d6ebaefc35ce88f15a85c8cdbd6e. llvm-svn: 307191
* Revert "Replace trivial use of external rc.exe by writing our own .res file."Eric Beckmann2017-07-051-2/+1
| | | | | | | | | This patch still seems to break CrWinClangLLD, reverting this once more until I can discover root problem. This reverts commit 3dbbc8ce43be50ffde2b1c655c6d3a25796fe78b. llvm-svn: 307188
* Revert "Revert "Replace trivial use of external rc.exe by writing our own ↵Eric Beckmann2017-07-011-1/+2
| | | | | | | | | | | | | | | | | | .res file."" Summary: This reverts commit 51931072a7c9a52540baf76fc30ef391d2529a2f. This revert was originally done because the integrations of the new WindowsResource library into LLD was causing error in chromium, due to bugs in how resource sections were handled. These bugs were fixed, meaning that the features may be reintegrated. Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D34922 llvm-svn: 306941
* [BinaryFormat] Identify AArch64 COFF filesMartin Storsjo2017-06-291-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D34742 llvm-svn: 306647
* Revert "Replace trivial use of external rc.exe by writing our own .res file."Eric Beckmann2017-06-291-2/+1
| | | | | | | | | | | | | | | This reverts commit d4c7e9fc63c10dbab0c30186ef8575474a704496. This is done in order to address the failure of CrWinClangLLD etc. bots. These throw an error of "side-by-side configuration is incorrect" during compilation, which sounds suspiciously related to these manifest changes. Revert "Switch external cvtres.exe for llvm's own resource library." This reverts commit 71fe8ef283a9dab9a3f21432c98466cbc23990d1. llvm-svn: 306618
* Replace trivial use of external rc.exe by writing our own .res file.Eric Beckmann2017-06-261-1/+2
| | | | | | | | | This patch removes the dependency on the external rc.exe tool by writing a simple .res file using our own library. In this patch I also added an explicit definition for the .res file magic. Furthermore, I added a unittest for embeded manifests and fixed a bug exposed by the test. llvm-svn: 306311
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-0/+216
This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
OpenPOWER on IntegriCloud