@@ -480,6 +480,9 @@ void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
480480 *TargetPtr |= Value & 0xFFF ;
481481 *TargetPtr |= ((Value >> 12 ) & 0xF ) << 16 ;
482482 break ;
483+ case ELF::R_ARM_REL32:
484+ *TargetPtr += Value - FinalAddress;
485+ break ;
483486 // Write 24 bit relative value to the branch instruction.
484487 case ELF::R_ARM_PC24: // Fall through.
485488 case ELF::R_ARM_CALL: // Fall through.
@@ -1324,6 +1327,19 @@ relocation_iterator RuntimeDyldELF::processRelocationRef(
13241327 RelType, 0 );
13251328 Section.advanceStubOffset (getMaxStubSize ());
13261329 }
1330+ } else if (RelType == ELF::R_ARM_GOT_PREL) {
1331+ uint32_t GOTOffset = allocateGOTEntries (SectionID, 1 );
1332+
1333+ RelocationEntry GOTRE (SectionID, Offset, ELF::R_ARM_REL32, GOTOffset);
1334+ addRelocationForSection (GOTRE, GOTSectionID);
1335+
1336+ // Fill in the value of the symbol we're targeting into the GOT
1337+ RelocationEntry RE = computeGOTOffsetRE (SectionID, GOTOffset,
1338+ Value.Offset , ELF::R_ARM_ABS32);
1339+ if (Value.SymbolName )
1340+ addRelocationForSymbol (RE, Value.SymbolName );
1341+ else
1342+ addRelocationForSection (RE, Value.SectionID );
13271343 } else {
13281344 uint32_t *Placeholder =
13291345 reinterpret_cast <uint32_t *>(computePlaceholderAddress (SectionID, Offset));
0 commit comments