mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
[MCJIT] Make MCJIT honor symbol visibility settings when populating the global
symbol table. Patch by Anthony Pesch. Thanks Anthony! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220245 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -205,10 +205,14 @@ RuntimeDyldImpl::loadObject(std::unique_ptr<ObjectImage> Obj) {
|
||||
bool IsCode = SI->isText();
|
||||
unsigned SectionID =
|
||||
findOrEmitSection(*Obj, *SI, IsCode, LocalSections);
|
||||
// Add the symbol to the local symbol table for this module.
|
||||
LocalSymbols[Name.data()] = SymbolLoc(SectionID, SectOffset);
|
||||
DEBUG(dbgs() << "\tOffset: " << format("%p", (uintptr_t)SectOffset)
|
||||
<< " flags: " << Flags << " SID: " << SectionID);
|
||||
GlobalSymbolTable[Name] = SymbolLoc(SectionID, SectOffset);
|
||||
// If exported, add to the global symbol table for other modules to also link in.
|
||||
if (Flags & SymbolRef::SF_Exported) {
|
||||
GlobalSymbolTable[Name] = SymbolLoc(SectionID, SectOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
DEBUG(dbgs() << "\tType: " << SymType << " Name: " << Name << "\n");
|
||||
|
Reference in New Issue
Block a user