Page MenuHomePhabricator

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

Authored by grimar on Sep 10 2020, 7:46 AM.

Details

Summary

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.

Diff Detail

Event Timeline

grimar created this revision.Sep 10 2020, 7:46 AM
Herald added a project: Restricted Project. · View Herald Transcript
grimar requested review of this revision.Sep 10 2020, 7:46 AM
jhenderson accepted this revision.Sep 14 2020, 3:05 AM

This looks a lot cleaner. LGTM.

This revision is now accepted and ready to land.Sep 14 2020, 3:05 AM