diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-09 03:39:05 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-09 03:39:05 +0000 |
| commit | 0d15f7313f0280e0f3445adc52bbb646a0521057 (patch) | |
| tree | fd9adc4943c63ae61178cb612f28b27b71c0ad08 /llvm/lib | |
| parent | 6e0ff1a3cb5a1719c12ce156c4297d724c20b955 (diff) | |
| download | bcm5719-llvm-0d15f7313f0280e0f3445adc52bbb646a0521057.tar.gz bcm5719-llvm-0d15f7313f0280e0f3445adc52bbb646a0521057.zip | |
Change getRelocationAdditionalInfo to be ELF only.
It was only implemented for ELF where it collected the Addend, so this
patch also renames it to getRelocationAddend.
llvm-svn: 181502
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 6 |
3 files changed, 4 insertions, 15 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index d4d84d31d06..57676ffaf45 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -519,10 +519,10 @@ void RuntimeDyldELF::findOPDEntrySection(ObjectImage &Obj, SymbolRef TargetSymbol; uint64_t TargetSymbolOffset; - int64_t TargetAdditionalInfo; check(i->getSymbol(TargetSymbol)); check(i->getOffset(TargetSymbolOffset)); - check(i->getAdditionalInfo(TargetAdditionalInfo)); + int64_t Addend; + check(getELFRelocationAddend(*i, Addend)); i = i.increment(err); if (i == e) @@ -544,7 +544,7 @@ void RuntimeDyldELF::findOPDEntrySection(ObjectImage &Obj, section_iterator tsi(Obj.end_sections()); check(TargetSymbol.getSection(tsi)); Rel.SectionID = findOrEmitSection(Obj, (*tsi), true, LocalSections); - Rel.Addend = (intptr_t)TargetAdditionalInfo; + Rel.Addend = (intptr_t)Addend; return; } } @@ -742,7 +742,7 @@ void RuntimeDyldELF::processRelocationRef(unsigned SectionID, uint64_t RelType; Check(RelI.getType(RelType)); int64_t Addend; - Check(RelI.getAdditionalInfo(Addend)); + Check(getELFRelocationAddend(RelI, Addend)); SymbolRef Symbol; Check(RelI.getSymbol(Symbol)); diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 70fec321ba3..f5b49ab0618 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -798,11 +798,6 @@ error_code COFFObjectFile::getRelocationTypeName(DataRefImpl Rel, #undef LLVM_COFF_SWITCH_RELOC_TYPE_NAME -error_code COFFObjectFile::getRelocationAdditionalInfo(DataRefImpl Rel, - int64_t &Res) const { - Res = 0; - return object_error::success; -} error_code COFFObjectFile::getRelocationValueString(DataRefImpl Rel, SmallVectorImpl<char> &Result) const { const coff_relocation *reloc = toRel(Rel); diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index dfd8d3d3dd1..af14c721459 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -989,12 +989,6 @@ MachOObjectFile::getRelocationTypeName(DataRefImpl Rel, return object_error::success; } -error_code MachOObjectFile::getRelocationAdditionalInfo(DataRefImpl Rel, - int64_t &Res) const { - Res = 0; - return object_error::success; -} - error_code MachOObjectFile::getRelocationValueString(DataRefImpl Rel, SmallVectorImpl<char> &Result) const { |

