1 //===- Reader.h -------------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_OBJCOPY_COFF_READER_H
10 #define LLVM_TOOLS_OBJCOPY_COFF_READER_H
13 #include "llvm/BinaryFormat/COFF.h"
14 #include "llvm/Object/COFF.h"
15 #include "llvm/Support/Error.h"
23 using object::COFFObjectFile
;
26 const COFFObjectFile
&COFFObj
;
28 Error
readExecutableHeaders(Object
&Obj
) const;
29 Error
readSections(Object
&Obj
) const;
30 Error
readSymbols(Object
&Obj
, bool IsBigObj
) const;
31 Error
setSymbolTargets(Object
&Obj
) const;
34 explicit COFFReader(const COFFObjectFile
&O
) : COFFObj(O
) {}
35 Expected
<std::unique_ptr
<Object
>> create() const;
38 } // end namespace coff
39 } // end namespace objcopy
40 } // end namespace llvm
42 #endif // LLVM_TOOLS_OBJCOPY_COFF_READER_H