This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readelf/readobj] - Fix the behavior when a sections is included in two groups at the same time.
ClosedPublic

Authored by grimar on Jul 20 2020, 6:38 AM.

Details

Summary

The current behavior was introduced by me in D37567 and it is a bit strange. It prints the
"Error: ...." message to the errs() manually and stops dumping the group section which has this error.
This behavior is consistent with GNU though, but it is very inconsistent with what the regular llvm-readelf
code usually does/prints, so I suggest to change the implementation:

  1. Instead of printing "Error: ...." to errs() - just report a warning.
  2. Try to continue dumping the section.
  3. Merge broken-group.test to group.text.

This is what this patch does.

Diff Detail

Event Timeline

grimar created this revision.Jul 20 2020, 6:38 AM
Herald added a project: Restricted Project. · View Herald Transcript
jhenderson added inline comments.Jul 21 2020, 1:39 AM
llvm/test/tools/llvm-readobj/ELF/groups.test
111

included to -> included in

124

Ditto.

grimar updated this revision to Diff 279456.Jul 21 2020, 2:29 AM
  • Addressed review comments.
This revision is now accepted and ready to land.Jul 22 2020, 1:10 AM
This revision was automatically updated to reflect the committed changes.