diff options
author | Bob Haarman <llvm@inglorion.net> | 2018-06-07 00:50:03 +0000 |
---|---|---|
committer | Bob Haarman <llvm@inglorion.net> | 2018-06-07 00:50:03 +0000 |
commit | 30913ac39ded3ba4bdad77162edeb73bc9879ba8 (patch) | |
tree | f231d80fd059e0d37489fef52ebf3dcbd4c00fb4 | |
parent | a74031b6402729c6c53d8f862e2fc6204a68a5a0 (diff) | |
download | bcm5719-llvm-30913ac39ded3ba4bdad77162edeb73bc9879ba8.tar.gz bcm5719-llvm-30913ac39ded3ba4bdad77162edeb73bc9879ba8.zip |
[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
llvm-svn: 334154
-rw-r--r-- | lld/COFF/Chunks.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp index ab6160cb702..412ff783222 100644 --- a/lld/COFF/Chunks.cpp +++ b/lld/COFF/Chunks.cpp @@ -98,7 +98,8 @@ void SectionChunk::applyRelX64(uint8_t *Off, uint16_t Type, OutputSection *OS, 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 *Off, uint16_t Type, OutputSection *OS, 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 *Off, uint16_t Type, OutputSection *OS, 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 *Off, uint16_t Type, OutputSection *OS, 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)); } } |