This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] Print ELF header flags names in GNU output
ClosedPublic

Authored by atanasyan on Sep 13 2018, 5:34 AM.

Details

Summary

GNU readelf tool prints hex value of the ELF header flags field and the flags names. This change adds the same functionality to llvm-readobj. Now llvm-readobj can print MIPS and RISCV flags.

New GNUStyle::printFlags() method is a copy of ScopedPrinter::printFlags() routine. Probably we can escape code duplication and / or simplify the printFlags() method. But it's a task for separate commit.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan created this revision.Sep 13 2018, 5:34 AM
echristo accepted this revision.Oct 19 2018, 3:16 PM

The specific use of ENUM_ENT is also somewhat confusing, but you didn't add that so OK.

-eric

This revision is now accepted and ready to land.Oct 19 2018, 3:16 PM

Thanks for review.

This revision was automatically updated to reflect the committed changes.