summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h')
-rw-r--r--lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h b/lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h
index bbc66618e2d..ff665033843 100644
--- a/lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h
+++ b/lld/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h
@@ -51,8 +51,11 @@ public:
const Atom *ta = nullptr;
for (const auto &r : *da) {
- if (r->kind() == llvm::ELF::R_MIPS_32 ||
- r->kind() == llvm::ELF::R_MIPS_NONE) {
+ if (r->kindNamespace() != lld::Reference::KindNamespace::ELF)
+ continue;
+ assert(r->kindArch() == Reference::KindArch::Mips);
+ if (r->kindValue() == llvm::ELF::R_MIPS_32 ||
+ r->kindValue() == llvm::ELF::R_MIPS_NONE) {
ta = r->target();
break;
}
OpenPOWER on IntegriCloud