forked from OSchip/llvm-project
b2702d6a45
Summary: When using llvm-objcopy -O binary and the resulting file will be empty (e.g. removing the only section that would be written, or using --only-keep with a section that doesn't exist/isn't SHF_ALLOC), we crash because FileOutputBuffer expects Size > 0. Add a regression test, and change Buffer to open/truncate the output file in this case. Reviewers: alexshap, jhenderson, jakehehrlich, espindola Reviewed By: alexshap, jhenderson Subscribers: jfb, llvm-commits, emaste, arichardson Differential Revision: https://reviews.llvm.org/D56806 llvm-svn: 352371 |
||
---|---|---|
.. | ||
COFF | ||
ELF | ||
Buffer.cpp | ||
Buffer.h | ||
CMakeLists.txt | ||
CopyConfig.cpp | ||
CopyConfig.h | ||
LLVMBuild.txt | ||
ObjcopyOpts.td | ||
StripOpts.td | ||
llvm-objcopy.cpp | ||
llvm-objcopy.h |