1 //===- COFFReader.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_LIB_OBJCOPY_COFF_COFFREADER_H
10 #define LLVM_LIB_OBJCOPY_COFF_COFFREADER_H
12 #include "llvm/BinaryFormat/COFF.h"
13 #include "llvm/Object/COFF.h"
14 #include "llvm/Support/Error.h"
22 using object::COFFObjectFile
;
25 const COFFObjectFile
&COFFObj
;
27 Error
readExecutableHeaders(Object
&Obj
) const;
28 Error
readSections(Object
&Obj
) const;
29 Error
readSymbols(Object
&Obj
, bool IsBigObj
) const;
30 Error
setSymbolTargets(Object
&Obj
) const;
33 explicit COFFReader(const COFFObjectFile
&O
) : COFFObj(O
) {}
34 Expected
<std::unique_ptr
<Object
>> create() const;
37 } // end namespace coff
38 } // end namespace objcopy
39 } // end namespace llvm
41 #endif // LLVM_LIB_OBJCOPY_COFF_COFFREADER_H