mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Add R_ARM_TARGET1 relocation to MCJIT and ensure that the runtime dyld reads
all symbols during object loading, not just global ones. This fixes JIT execution of code using llvm.global_ctors with internal linkage constructors. llvm-svn: 168148
This commit is contained in:
parent
220b5e3636
commit
265971e784
@ -125,9 +125,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectBuffer *InputBuffer) {
|
||||
<< " flags: " << flags
|
||||
<< " SID: " << SectionID
|
||||
<< " Offset: " << format("%p", SectOffset));
|
||||
bool isGlobal = flags & SymbolRef::SF_Global;
|
||||
if (isGlobal)
|
||||
GlobalSymbolTable[Name] = SymbolLoc(SectionID, SectOffset);
|
||||
GlobalSymbolTable[Name] = SymbolLoc(SectionID, SectOffset);
|
||||
}
|
||||
}
|
||||
DEBUG(dbgs() << "\tType: " << SymType << " Name: " << Name << "\n");
|
||||
|
@ -290,6 +290,7 @@ void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
|
||||
|
||||
// Write a 32bit value to relocation address, taking into account the
|
||||
// implicit addend encoded in the target.
|
||||
case ELF::R_ARM_TARGET1 :
|
||||
case ELF::R_ARM_ABS32 :
|
||||
*TargetPtr += Value;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user