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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 06:39:01 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

The current behavior was introduced by me in D37567 <https://reviews.llvm.org/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.


https://reviews.llvm.org/D84170

Files:
  llvm/test/tools/llvm-readobj/ELF/broken-group.test
  llvm/test/tools/llvm-readobj/ELF/groups.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84170.279226.patch
Type: text/x-patch
Size: 7628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200720/789ae231/attachment-0001.bin>


More information about the llvm-commits mailing list