mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
readobj: Dump PE/COFF optional records.
These records are mandatory for executables and are used by the loader. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D939 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -84,8 +84,10 @@ error_code object::createBinary(MemoryBuffer *Source,
|
||||
}
|
||||
case sys::fs::file_magic::coff_object:
|
||||
case sys::fs::file_magic::pecoff_executable: {
|
||||
OwningPtr<Binary> ret(new COFFObjectFile(scopedSource.take(), ec));
|
||||
if (ec) return ec;
|
||||
OwningPtr<Binary> ret(
|
||||
ObjectFile::createCOFFObjectFile(scopedSource.take()));
|
||||
if (!ret)
|
||||
return object_error::invalid_file_type;
|
||||
Result.swap(ret);
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user