- bool loadObject(MemoryBuffer *InputBuffer);
- uint64_t getSymbolAddress(StringRef Name);
- void reassignSymbolAddress(StringRef Name, uint64_t Addr);
- // FIXME: Should be parameterized to get the memory block associated with
- // a particular loaded object.
- sys::MemoryBlock getMemoryBlock();
+ /// Add the referenced object file to the list of objects to be loaded and
+ /// relocated.
+ std::unique_ptr<LoadedObjectInfo> loadObject(const object::ObjectFile &O);
+
+ /// Get the address of our local copy of the symbol. This may or may not
+ /// be the address used for relocation (clients can copy the data around
+ /// and resolve relocatons based on where they put it).
+ void *getSymbolAddress(StringRef Name) const;
+
+ /// Get the address of the target copy of the symbol (works for both exported
+ /// and non-exported symbols). This is the address used for relocation.
+ uint64_t getSymbolLoadAddress(StringRef Name) const;
+
+ /// Get the address of the target copy of the symbol (works for exported
+ /// symbols only). This is the address used for relocation.
+ uint64_t getExportedSymbolLoadAddress(StringRef Name) const;
+
+ /// Resolve the relocations for all symbols we currently know about.
+ void resolveRelocations();
+
+ /// Map a section to its target address space value.
+ /// Map the address of a JIT section as returned from the memory manager
+ /// to the address in the target process as the running code will see it.
+ /// This is the address which will be used for relocation resolution.
+ void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress);
+
+ /// Register any EH frame sections that have been loaded but not previously
+ /// registered with the memory manager. Note, RuntimeDyld is responsible
+ /// for identifying the EH frame and calling the memory manager with the
+ /// EH frame section data. However, the memory manager itself will handle
+ /// the actual target-specific EH frame registration.
+ void registerEHFrames();
+
+ void deregisterEHFrames();
+
+ bool hasError();