[PATCH] D72973: using symbol index+symbol name + storage mapping class as label for llvm-objdump -D

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 09:01:33 PST 2020


daltenty requested changes to this revision.
daltenty added a comment.
This revision now requires changes to proceed.

Please add an option to control this output change.



================
Comment at: llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:23
 	StringRef Name;
-	uint8_t   Type;
+        int16_t TypeOrSmc;
+        int64_t Index;
----------------
I think using a union or inheritance is probably better than dual purposing this field.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1383
                          SectionAddr + Start + VMAAdjustment);
-
-      outs() << SymbolName << ":\n";
+      if (Obj->isXCOFF()) {
+        printXCOFFSymbolDescription(Symbols[SI], SymbolName);
----------------
DiggerLin wrote:
> daltenty wrote:
> > Shouldn't this behaviour be option gated under an XCOFF specific option? As is this is going to result in output incompatible with binutils objdump on AIX, which could break tools.
> when dissemble the xcoff object file, we change the label to symbol index+ symbol name + storage mapping class, it is not a new option. I think it is different with the  with binutils objdump on AIX.
The fact that it is different with the with binutils objdump on AIX is the issue. As the top of this file indicates: "The flags and output of this program should be near identical to those of binutils objdump."

We need to add an XCOFF specific option, something like "--expanded-symbol-description", to turn on this behavior change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72973





More information about the llvm-commits mailing list