[XCOFF][llvm-objdump] change the priority of symbols with
authoresmeyi <esme.yi@ibm.com>
Fri, 18 Feb 2022 05:29:10 +0000 (00:29 -0500)
committeresmeyi <esme.yi@ibm.com>
Fri, 18 Feb 2022 05:29:10 +0000 (00:29 -0500)
commit2ad662172cbbd1ca53489bf8bddb0183d7692708
tree38613136c6ef691d0d3d0f3d1b415a37991688b6
parent06f346cb7238fff88b2c7f94bf55fde50de5c1dd
[XCOFF][llvm-objdump] change the priority of symbols with
                      the same address by symbol types.

Summary: In XCOFF, each section comes with a default symbol
         with the same name as the section. It doesn't bind
         to code locations and it may cause incorrect display
         of symbol names under `llvm-objdump -d`.
         This patch changes the priority of symbols with the
         same address by symbol type.

Reviewed By: jhenderson, shchenz

Differential Revision: https://reviews.llvm.org/D117642
15 files changed:
llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h
llvm/include/llvm/Object/ObjectFile.h
llvm/test/CodeGen/PowerPC/aix-prefixed-instruction-boundary.mir
llvm/test/CodeGen/PowerPC/aix-return55.ll
llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-const.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir
llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-textdisassembly.ll
llvm/test/tools/llvm-objdump/XCOFF/disassemble-all.test
llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-description.test
llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-priority.ll [new file with mode: 0644]
llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbolize-operands.ll
llvm/test/tools/llvm-objdump/XCOFF/print-linenumber.test
llvm/tools/llvm-objdump/llvm-objdump.cpp