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);
}
};
}
# RUN: llvm-mc -triple=arm64-apple-ios7.0.0 -code-model=small -relocation-model=pic -filetype=obj -o %T/foo.o %s
-# RUN: llvm-rtdyld -triple=arm64-apple-ios7.0.0 -verify -check=%s %/T/foo.o
+# RUN: llvm-rtdyld -triple=arm64-apple-ios7.0.0 -map-section foo.o,__text=0x10bc0 -verify -check=%s %/T/foo.o
.section __TEXT,__text,regular,pure_instructions
.ios_version_min 7, 0