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/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.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/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 96b4e127aa6..6510bd0a2e3 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -919,17 +919,18 @@ void RuntimeDyldELF::resolveRelocation(const SectionEntry &Section, } } -void RuntimeDyldELF::processRelocationRef(unsigned SectionID, - RelocationRef RelI, - ObjectImage &Obj, - ObjSectionToIDMap &ObjSectionToID, - const SymbolTableMap &Symbols, - StubMap &Stubs) { +relocation_iterator +RuntimeDyldELF::processRelocationRef(unsigned SectionID, + relocation_iterator RelI, + ObjectImage &Obj, + ObjSectionToIDMap &ObjSectionToID, + const SymbolTableMap &Symbols, + StubMap &Stubs) { uint64_t RelType; - Check(RelI.getType(RelType)); + Check(RelI->getType(RelType)); int64_t Addend; - Check(getELFRelocationAddend(RelI, Addend)); - symbol_iterator Symbol = RelI.getSymbol(); + Check(getELFRelocationAddend(*RelI, Addend)); + symbol_iterator Symbol = RelI->getSymbol(); // Obtain the symbol name which is referenced in the relocation StringRef TargetName; @@ -1001,7 +1002,7 @@ void RuntimeDyldELF::processRelocationRef(unsigned SectionID, } } uint64_t Offset; - Check(RelI.getOffset(Offset)); + Check(RelI->getOffset(Offset)); DEBUG(dbgs() << "\t\tSectionID: " << SectionID << " Offset: " << Offset @@ -1337,6 +1338,7 @@ void RuntimeDyldELF::processRelocationRef(unsigned SectionID, else addRelocationForSection(RE, Value.SectionID); } + return ++RelI; } void RuntimeDyldELF::updateGOTEntries(StringRef Name, uint64_t Addr) { |