This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readelf] - Do no print an empty symbol version as "<corrupt>"
ClosedPublic

Authored by grimar on Dec 10 2019, 1:46 AM.

Details

Summary

It is discussed here https://reviews.llvm.org/D71118#inline-643172

Currently when a version is empty, llvm-readelf prints:
"000: 0 (*local*) 2 (<corrupt>)"

But GNU readelf does not treat empty section as corrupt.
There is no sense in having empty versions anyways it seems, but
this change is for consistency with GNU.

Diff Detail

Event Timeline

grimar created this revision.Dec 10 2019, 1:46 AM
Herald added a project: Restricted Project. · View Herald Transcript
jhenderson accepted this revision.Dec 10 2019, 1:49 AM

LGTM. Might want to wait for others to have a chance to comment too.

This revision is now accepted and ready to land.Dec 10 2019, 1:49 AM
MaskRay accepted this revision.Dec 10 2019, 10:23 AM

I think linkers (GNU ld, gold, and lld) don't create empty version names (vda_name). I don't mind whether this is <corrupt> or empty.

This revision was automatically updated to reflect the committed changes.