[all-commits] [llvm/llvm-project] a26a44: [llvm-objdump][XCOFF] Use symbol index+symbol name...

diggerlin via All-commits all-commits at lists.llvm.org
Mon Apr 6 07:11:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a26a441b99ff313a56c3e35ee526342d3f43c8b8
      https://github.com/llvm/llvm-project/commit/a26a441b99ff313a56c3e35ee526342d3f43c8b8
  Author: diggerlin <digger.llvm at gmail.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-objdump.rst
    M llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h
    M llvm/include/llvm/Object/XCOFFObjectFile.h
    M llvm/lib/BinaryFormat/XCOFF.cpp
    M llvm/lib/Object/XCOFFObjectFile.cpp
    A llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-description.test
    M llvm/tools/llvm-objdump/XCOFFDump.cpp
    A llvm/tools/llvm-objdump/XCOFFDump.h
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.h

  Log Message:
  -----------
  [llvm-objdump][XCOFF] Use symbol index+symbol name + storage mapping class as label for -D

SUMMARY:

For the llvm-objdump -D, the symbol name is used as a label in the disassembly for the specific address (when a symbol address is equal to the virtual address in the dump).

In XCOFF, multiple symbols may have the same name, being differentiated by their storage mapping class. It is helpful to print the QualName and not just the name when forming the output label for a csect symbol. The symbol index further removes any ambiguity caused by duplicate names.

To maintain compatibility with the binutils objdump, the XCOFF-specific --symbol-description option is added to enable the enhanced format.

Reviewers: hubert.reinterpretcast, James Henderson, Jason Liu ,daltenty
Subscribers: wuzish, nemanjai, hiraditya

Differential Revision: https://reviews.llvm.org/D72973




More information about the All-commits mailing list