diff options
-rw-r--r-- | lld/ELF/InputSection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 2548200feb6..f758145e021 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -52,7 +52,9 @@ InputSectionBase<ELFT>::getOffset(uintX_t Offset) { case Merge: return cast<MergeInputSection<ELFT>>(this)->getOffset(Offset); case MipsReginfo: - return cast<MipsReginfoInputSection<ELFT>>(this)->getOffset(Offset); + // MIPS .reginfo sections are consumed by the linker, + // so it should never be copied to output. + llvm_unreachable("MIPS .reginfo reached writeTo()."); } llvm_unreachable("Invalid section kind"); } |