1 //===---- ObjectImage.h - Format independent executuable object image -----===//
\r
3 // The LLVM Compiler Infrastructure
\r
5 // This file is distributed under the University of Illinois Open Source
\r
6 // License. See LICENSE.TXT for details.
\r
8 //===----------------------------------------------------------------------===//
\r
10 // This file declares a file format independent ObjectImage class.
\r
12 //===----------------------------------------------------------------------===//
\r
14 #ifndef LLVM_EXECUTIONENGINE_OBJECTIMAGE_H
\r
15 #define LLVM_EXECUTIONENGINE_OBJECTIMAGE_H
\r
17 #include "llvm/Object/ObjectFile.h"
\r
18 #include "llvm/ExecutionEngine/ObjectBuffer.h"
\r
23 /// ObjectImage - A container class that represents an ObjectFile that has been
\r
24 /// or is in the process of being loaded into memory for execution.
\r
26 ObjectImage() LLVM_DELETED_FUNCTION;
\r
27 ObjectImage(const ObjectImage &other) LLVM_DELETED_FUNCTION;
\r
30 OwningPtr<ObjectBuffer> Buffer;
\r
33 ObjectImage(ObjectBuffer *Input) : Buffer(Input) {}
\r
34 virtual ~ObjectImage() {}
\r
36 virtual object::symbol_iterator begin_symbols() const = 0;
\r
37 virtual object::symbol_iterator end_symbols() const = 0;
\r
39 virtual object::section_iterator begin_sections() const = 0;
\r
40 virtual object::section_iterator end_sections() const = 0;
\r
42 virtual /* Triple::ArchType */ unsigned getArch() const = 0;
\r
44 // Subclasses can override these methods to update the image with loaded
\r
45 // addresses for sections and common symbols
\r
46 virtual void updateSectionAddress(const object::SectionRef &Sec,
\r
48 virtual void updateSymbolAddress(const object::SymbolRef &Sym,
\r
51 virtual StringRef getData() const = 0;
\r
53 // Subclasses can override these methods to provide JIT debugging support
\r
54 virtual void registerWithDebugger() = 0;
\r
55 virtual void deregisterWithDebugger() = 0;
\r
58 } // end namespace llvm
\r
60 #endif // LLVM_RUNTIMEDYLD_OBJECT_IMAGE_H
\r