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
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;
}
}
} 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;