[PATCH] D155353: [llvm-readobj] Print <null> for relocation target with an empty name

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 08:29:53 PDT 2023


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:6953-6954
   StringRef SymbolName = RelSym.Name;
+  if (RelSym.Sym && RelSym.Name.empty())
+    SymbolName = "<null>";
   SmallString<32> RelocName;
----------------
jhenderson wrote:
> If I'm not mistaken, we don't actually have a dedicated test case for this bit of the logic? (It's covered by other tests, but more by accident than design, I feel - there's no purpose-written llvm-readobj LLVM style test).
There is a dedicated test: 	reloc-zero-name-or-value.test  from D81842


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155353/new/

https://reviews.llvm.org/D155353



More information about the llvm-commits mailing list