/// 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);
+ void *getSymbolAddress(StringRef Name) const;
/// Get the address of the target copy of the symbol. This is the address
/// used for relocation.
- uint64_t getSymbolLoadAddress(StringRef Name);
+ uint64_t getSymbolLoadAddress(StringRef Name) const;
/// Resolve the relocations for all symbols we currently know about.
void resolveRelocations();
return Dyld->loadObject(std::move(InputImage));
}
-void *RuntimeDyld::getSymbolAddress(StringRef Name) {
+void *RuntimeDyld::getSymbolAddress(StringRef Name) const {
if (!Dyld)
return nullptr;
return Dyld->getSymbolAddress(Name);
}
-uint64_t RuntimeDyld::getSymbolLoadAddress(StringRef Name) {
+uint64_t RuntimeDyld::getSymbolLoadAddress(StringRef Name) const {
if (!Dyld)
return 0;
return Dyld->getSymbolLoadAddress(Name);
return true;
}
- uint64_t getSectionLoadAddress(unsigned SectionID) {
+ uint64_t getSectionLoadAddress(unsigned SectionID) const {
return Sections[SectionID].LoadAddress;
}
- uint8_t *getSectionAddress(unsigned SectionID) {
+ uint8_t *getSectionAddress(unsigned SectionID) const {
return (uint8_t *)Sections[SectionID].Address;
}
std::unique_ptr<ObjectImage>
loadObject(std::unique_ptr<ObjectImage> InputObject);
- uint8_t* getSymbolAddress(StringRef Name) {
+ uint8_t* getSymbolAddress(StringRef Name) const {
// FIXME: Just look up as a function for now. Overly simple of course.
// Work in progress.
SymbolTableMap::const_iterator pos = GlobalSymbolTable.find(Name);
return getSectionAddress(Loc.first) + Loc.second;
}
- uint64_t getSymbolLoadAddress(StringRef Name) {
+ uint64_t getSymbolLoadAddress(StringRef Name) const {
// FIXME: Just look up as a function for now. Overly simple of course.
// Work in progress.
SymbolTableMap::const_iterator pos = GlobalSymbolTable.find(Name);