tools like nm and ar only need register_claim_file and add_symbols. Don't abort
if other hooks are missing.
llvm-svn: 64812
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 7735af7..e2cd6c6 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -142,11 +142,16 @@
}
}
- if (!registeredClaimFile || !registeredAllSymbolsRead || !registeredCleanup ||
- !add_symbols || !get_symbols || !add_input_file) {
- (*message)(LDPL_ERROR, "Not all hooks registered for LLVMgold.");
- return LDPS_ERR;
- }
+ if (!registeredClaimFile)
+ {
+ (*message)(LDPL_ERROR, "register_claim_file not passed to LLVMgold.");
+ return LDPS_ERR;
+ }
+ if (!add_symbols)
+ {
+ (*message)(LDPL_ERROR, "add_symbols not passed to LLVMgold.");
+ return LDPS_ERR;
+ }
return LDPS_OK;
}