Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,10 @@ class RuntimeDyldMachOAArch64
(RE.Size == 2 || RE.Size == 3)) ||
RE.Size == 2);
SectionEntry &Section = Sections[RE.SectionID];
StubMap::const_iterator i = Stubs.find(Value);
auto [It, Inserted] = Stubs.try_emplace(Value);
int64_t Offset;
if (i != Stubs.end())
Offset = static_cast<int64_t>(i->second);
if (!Inserted)
Offset = static_cast<int64_t>(It->second);
else {
// FIXME: There must be a better way to do this then to check and fix the
// alignment every time!!!
Expand All @@ -458,7 +458,7 @@ class RuntimeDyldMachOAArch64
(BaseAddress + Section.getStubOffset() + StubAlignment - 1) &
-StubAlignment;
unsigned StubOffset = StubAddress - BaseAddress;
Stubs[Value] = StubOffset;
It->second = StubOffset;
assert(isAligned(getStubAlignment(), StubAddress) &&
"GOT entry not aligned");
RelocationEntry GOTRE(RE.SectionID, StubOffset,
Expand Down
Loading