[llvm] [llvm-nm] Introduce synthetic flag (PR #138232)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 15 23:50:06 PDT 2025
================
@@ -1783,6 +1785,55 @@ getDynamicSyms(SymbolicFile &Obj) {
return E->getDynamicSymbolIterators();
}
+// Returns false if there is error found or true otherwise.
+static bool getPltSyms(SymbolicFile &Obj, std::vector<NMSymbol> &SymbolList) {
+ const auto *ELFObj = dyn_cast<ELFObjectFileBase>(&Obj);
+ if (!ELFObj)
+ return true;
+
+ std::string Err;
+ Triple TT;
+ TT.setArch(ELFObj->getArch());
+ TT.setOS(ELFObj->getOS());
+ const Target *TheTarget = TargetRegistry::lookupTarget(TT, Err);
+ if (!TheTarget) {
+ error("unable to find target for " + Obj.getFileName() + ": " + Err);
----------------
jh7370 wrote:
Could you give an example of what the full error message looks like, if e.g. you use llvm-nm built without X86_64 support with one that does support that target, please? I'd like to be sure the message isn't too clunky.
https://github.com/llvm/llvm-project/pull/138232
More information about the llvm-commits
mailing list