[PATCH] D87454: [llvm-readelf/obj] - Refine and generalize the code that is used to dump notes.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 07:46:23 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: kerbowa, rupprecht, nhaehnle, jvesely, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.

There is some code that can be shared between GNU/LLVM styles.
Also, this fixes 2 inconsistencies related to dumping unknown note types:

1. For GNU style we printed "Unknown note type: (0x00000003)" in some cases, and "Unknown note type (0x00000003)" (no colon) in other cases. GNU readelf always prints `:`. This patch removes the related code duplication and does the same.
2. For LLVM style in some cases we printed "Unknown note type (0x00000003)", but sometimes just "Unknown (0x00000003)". The latter is the right form, which is consistent with other unknowns that are printed in LLVM style.

Rebased on top of D87453 <https://reviews.llvm.org/D87453>.


https://reviews.llvm.org/D87454

Files:
  llvm/test/CodeGen/AMDGPU/elf-notes.ll
  llvm/test/tools/llvm-readobj/ELF/note-freebsd.s
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87454.290972.patch
Type: text/x-patch
Size: 18809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200910/9f635a49/attachment.bin>


More information about the llvm-commits mailing list