1 //===- Reader.h -------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TOOLS_OBJCOPY_COFF_READER_H
11 #define LLVM_TOOLS_OBJCOPY_COFF_READER_H
14 #include "llvm/BinaryFormat/COFF.h"
15 #include "llvm/Object/COFF.h"
16 #include "llvm/Support/Error.h"
24 using object::COFFObjectFile;
27 const COFFObjectFile &COFFObj;
29 Error readExecutableHeaders(Object &Obj) const;
30 Error readSections(Object &Obj) const;
31 Error readSymbols(Object &Obj, bool IsBigObj) const;
32 Error setRelocTargets(Object &Obj) const;
35 explicit COFFReader(const COFFObjectFile &O) : COFFObj(O) {}
36 Expected<std::unique_ptr<Object>> create() const;
39 } // end namespace coff
40 } // end namespace objcopy
41 } // end namespace llvm
43 #endif // LLVM_TOOLS_OBJCOPY_COFF_READER_H