[lld] r334154 - [COFF] report file containing unsupported relocation
Bob Haarman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 6 17:50:03 PDT 2018
Author: inglorion
Date: Wed Jun 6 17:50:03 2018
New Revision: 334154
URL: http://llvm.org/viewvc/llvm-project?rev=334154&view=rev
Log:
[COFF] report file containing unsupported relocation
Summary:
When reporting an unsupported relocation type, let's also report the
file we encountered it in to aid diagnosis.
Reviewers: ruiu, rnk
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45911
Modified:
lld/trunk/COFF/Chunks.cpp
Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=334154&r1=334153&r2=334154&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Wed Jun 6 17:50:03 2018
@@ -98,7 +98,8 @@ void SectionChunk::applyRelX64(uint8_t *
case IMAGE_REL_AMD64_SECTION: applySecIdx(Off, OS); break;
case IMAGE_REL_AMD64_SECREL: applySecRel(this, Off, OS, S); break;
default:
- fatal("unsupported relocation type 0x" + Twine::utohexstr(Type));
+ fatal("unsupported relocation type 0x" + Twine::utohexstr(Type) + " in " +
+ toString(File));
}
}
@@ -112,7 +113,8 @@ void SectionChunk::applyRelX86(uint8_t *
case IMAGE_REL_I386_SECTION: applySecIdx(Off, OS); break;
case IMAGE_REL_I386_SECREL: applySecRel(this, Off, OS, S); break;
default:
- fatal("unsupported relocation type 0x" + Twine::utohexstr(Type));
+ fatal("unsupported relocation type 0x" + Twine::utohexstr(Type) + " in " +
+ toString(File));
}
}
@@ -174,7 +176,8 @@ void SectionChunk::applyRelARM(uint8_t *
case IMAGE_REL_ARM_SECTION: applySecIdx(Off, OS); break;
case IMAGE_REL_ARM_SECREL: applySecRel(this, Off, OS, S); break;
default:
- fatal("unsupported relocation type 0x" + Twine::utohexstr(Type));
+ fatal("unsupported relocation type 0x" + Twine::utohexstr(Type) + " in " +
+ toString(File));
}
}
@@ -284,7 +287,8 @@ void SectionChunk::applyRelARM64(uint8_t
case IMAGE_REL_ARM64_SECREL_LOW12L: applySecRelLdr(this, Off, OS, S); break;
case IMAGE_REL_ARM64_SECTION: applySecIdx(Off, OS); break;
default:
- fatal("unsupported relocation type 0x" + Twine::utohexstr(Type));
+ fatal("unsupported relocation type 0x" + Twine::utohexstr(Type) + " in " +
+ toString(File));
}
}
More information about the llvm-commits
mailing list