assert(RE.Size == 2);
SectionEntry &Section = Sections[RE.SectionID];
StubMap::const_iterator i = Stubs.find(Value);
- uintptr_t Addr;
+ int64_t Offset;
if (i != Stubs.end())
- Addr = reinterpret_cast<uintptr_t>(Section.Address) + i->second;
+ Offset = static_cast<int64_t>(i->second);
else {
// FIXME: There must be a better way to do this then to check and fix the
// alignment every time!!!
else
addRelocationForSection(GOTRE, Value.SectionID);
Section.StubOffset = StubOffset + getMaxStubSize();
- Addr = StubAddress;
+ Offset = static_cast<int64_t>(StubOffset);
}
- RelocationEntry TargetRE(RE.SectionID, RE.Offset, RE.RelType, /*Addend=*/0,
+ RelocationEntry TargetRE(RE.SectionID, RE.Offset, RE.RelType, Offset,
RE.IsPCRel, RE.Size);
- resolveRelocation(TargetRE, static_cast<uint64_t>(Addr));
+ addRelocationForSection(TargetRE, RE.SectionID);
}
};
}