Index: ELF/Target.cpp =================================================================== --- ELF/Target.cpp +++ ELF/Target.cpp @@ -566,7 +566,7 @@ relocateOne(Loc, BufEnd, R_386_TLS_LE, P, SA); return 0; } - llvm_unreachable("Unknown TLS optimization"); + fatal("Unknown TLS optimization for relocation: " + Twine(Type)); } // "Ulrich Drepper, ELF Handling For Thread-Local Storage" (5.1 @@ -911,7 +911,7 @@ // The next relocation should be against __tls_get_addr, so skip it return 1; } - llvm_unreachable("Unknown TLS optimization"); + fatal("Unknown TLS optimization for relocation: " + Twine(Type)); } void X86_64TargetInfo::relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, @@ -1467,7 +1467,7 @@ case R_AARCH64_TLSDESC_ADD_LO12_NC: case R_AARCH64_TLSDESC_CALL: { if (canBePreempted(S)) - fatal("Unsupported TLS optimization"); + fatal("Unsupported TLS optimization for relocation: " + Twine(Type)); uint64_t X = S ? S->getVA() : SA; relocateTlsGdToLe(Type, Loc, BufEnd, P, X); return 0; @@ -1477,7 +1477,7 @@ relocateTlsIeToLe(Type, Loc, BufEnd, P, S->getVA()); return 0; } - llvm_unreachable("Unknown TLS optimization"); + fatal("Unknown TLS optimization for relocation: " + Twine(Type)); } // Global-Dynamic relocations can be relaxed to Local-Exec if both binary is