diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-03-21 07:26:41 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-03-21 07:26:41 +0000 |
commit | 046709f06ba0ee770c3abd78abaa0e1a679ae64f (patch) | |
tree | daf1bf880469bf2df1f798bce8f5bc057108d80d /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 997a923eeb3972ff2bcb4122d52bee310d97dce2 (diff) | |
download | bcm5719-llvm-046709f06ba0ee770c3abd78abaa0e1a679ae64f.tar.gz bcm5719-llvm-046709f06ba0ee770c3abd78abaa0e1a679ae64f.zip |
[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>
llvm-svn: 204439
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 6b1dd875958..b75b3e33b07 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -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); |