[llvm] [llvm-readobj][COFF] Implement --coff-pseudoreloc in llvm-readobj to dump runtime pseudo-relocation records (PR #151816)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 01:15:03 PDT 2025


================
@@ -2002,11 +2002,12 @@ void COFFDumper::printCOFFBaseReloc() {
 }
 
 void COFFDumper::printCOFFPseudoReloc() {
-  if (!Obj->getDOSHeader()) {
-    W.startLine()
-        << "pseudo-relocation is only meaningful for a PE image file\n";
+  ListScope D(W, "PseudoReloc");
+  W.flush();
+
+  // Pseudo-relocation is only meaningful for a PE image file.
----------------
jh7370 wrote:

Is "pseudo-relocation" here referring to the general concept or specifically the option? I'm guessing it probably doesn't matter, but it impacts how you write this comment. If referring to the option, use the option name, including the "--" prefix. Otherwise, I'd say "Pseudo-relocations are only meaningful with PE image files."

https://github.com/llvm/llvm-project/pull/151816


More information about the llvm-commits mailing list