Page MenuHomePhabricator

[llvm-readobj] Add GNU style dumper for .gnu.version_d section
AbandonedPublic

Authored by Higuoxing on Apr 5 2019, 2:21 AM.

Details

Summary

This patch adds GNU style dumper for .gnu.version_d section

Event Timeline

Higuoxing created this revision.Apr 5 2019, 2:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2019, 2:21 AM
Higuoxing marked an inline comment as done.Apr 5 2019, 2:25 AM
Higuoxing added inline comments.
llvm/tools/llvm-readobj/ELFDumper.cpp
3453

In GNU readelf, there's no limit on the number of predecessors. For example, if one symbol has more than one parents, GNU readelf will give:

Parent 1: VERSION1
Parent 2: VERSION0
...

Shall we do the same thing in llvm-readelf ?

jhenderson added inline comments.Apr 5 2019, 2:49 AM
llvm/tools/llvm-readobj/ELFDumper.cpp
3417

Given that much of this code is a copy of the LLVMStyle, that indicates that it should be shared somehow. I don't know if in this file, or in the Object library somewhere makes sense, but I think the only distinction should be how to print the output.

3453

Is there a good reason to limit it? If not, I don't think we should. However, I get the feeling that this is a different patch, since we should do it in LLVM style too, unless there's a good reason not to.

Higuoxing marked an inline comment as done and an inline comment as not done.Apr 5 2019, 3:02 AM
Higuoxing added inline comments.
llvm/tools/llvm-readobj/ELFDumper.cpp
3417

Yes, I agree. I would like to improve this in the future.

3453

I had asked @grimar about this in https://reviews.llvm.org/D21552

I think it's good to be robust when dumping some uncommon object files.

jhenderson added inline comments.Apr 5 2019, 3:09 AM
llvm/tools/llvm-readobj/ELFDumper.cpp
3417

I don't think we should delay it to the future. It should be done either as part of, or more likely prior to this patch.

3453

By robust, I think we should handle all cases we reasonably can. However, as this is already a limitation, I don't think we need to change it in this patch, but it can be in a follow-up.

Higuoxing planned changes to this revision.Apr 5 2019, 3:13 AM
Higuoxing marked an inline comment as done.
Higuoxing added inline comments.
llvm/tools/llvm-readobj/ELFDumper.cpp
3417

Sure, I will do that first. Thanks.

Higuoxing abandoned this revision.May 28 2019, 10:58 PM

Abandon Revision. @grimar has implemented it in https://reviews.llvm.org/D62520