mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-02 22:32:08 +00:00
Consistently check 'IsCode' when allocating sections in RuntimeDyld (via
findOrEmitSection). Vaidas Gasiunas's patch, r201259, fixed one instance where we were always allocating sections as text. This patch fixes the remaining buggy call sites. No test case: This isn't breaking anything that I know of, it's just inconsistent. <rdar://problem/15943542> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201605 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3de371b53
commit
25818a6e26
@ -709,7 +709,9 @@ void RuntimeDyldELF::findOPDEntrySection(ObjectImage &Obj,
|
||||
|
||||
section_iterator tsi(Obj.end_sections());
|
||||
check(TargetSymbol->getSection(tsi));
|
||||
Rel.SectionID = findOrEmitSection(Obj, (*tsi), true, LocalSections);
|
||||
bool IsCode = false;
|
||||
tsi->isText(IsCode);
|
||||
Rel.SectionID = findOrEmitSection(Obj, (*tsi), IsCode, LocalSections);
|
||||
Rel.Addend = (intptr_t)Addend;
|
||||
return;
|
||||
}
|
||||
|
@ -378,7 +378,9 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
|
||||
}
|
||||
} else {
|
||||
SectionRef Sec = MachO->getRelocationSection(RE);
|
||||
Value.SectionID = findOrEmitSection(Obj, Sec, true, ObjSectionToID);
|
||||
bool IsCode = false;
|
||||
Sec.isText(IsCode);
|
||||
Value.SectionID = findOrEmitSection(Obj, Sec, IsCode, ObjSectionToID);
|
||||
uint64_t Addr;
|
||||
Sec.getAddress(Addr);
|
||||
Value.Addend = Addend - Addr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user