[RuntimeDyld] Allow processRelocationRef to process more than one relocation entry at a time.

Some targets require more than one relocation entry to perform a relocation.
This change allows processRelocationRef to process more than one relocation
entry at a time by passing the relocation iterator itself instead of just
the relocation entry.

Related to <rdar://problem/16199095>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204439 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Juergen Ributzka
2014-03-21 07:26:41 +00:00
parent fc029f2983
commit 4923eea4f6
13 changed files with 90 additions and 46 deletions

View File

@ -818,6 +818,16 @@ MachOObjectFile::section_rel_end(DataRefImpl Sec) const {
return relocation_iterator(RelocationRef(Ret, this));
}
bool MachOObjectFile::section_rel_empty(DataRefImpl Sec) const {
if (is64Bit()) {
MachO::section_64 Sect = getSection64(Sec);
return Sect.nreloc == 0;
} else {
MachO::section Sect = getSection(Sec);
return Sect.nreloc == 0;
}
}
void MachOObjectFile::moveRelocationNext(DataRefImpl &Rel) const {
const MachO::any_relocation_info *P =
reinterpret_cast<const MachO::any_relocation_info *>(Rel.p);