Page MenuHomePhabricator

[llvm-readelf] - Improve dumping of objects without a section header string table.

Authored by grimar on Jan 22 2020, 7:00 AM.



We have a test/Object/no-section-header-string-table.test which checks
what happens when an object does not have a section header string table.
It does not check the full output though.
Currently our output is different from GNU readelf, because the latter prints
"<no-strings>" instead of a section name, while we print nothing.

This patch fixes this, adds a proper test case and removes the one from test/Object,
as it is not a right folder for llvm-readelf tests.

Diff Detail

Event Timeline

grimar created this revision.Jan 22 2020, 7:00 AM
Herald added a project: Restricted Project. · View Herald Transcript
grimar retitled this revision from [llvm-readelf] - Improve dumping of objects without section header string table. to [llvm-readelf] - Improve dumping of objects without a section header string table..Jan 22 2020, 7:00 AM
MaskRay accepted this revision.Jan 23 2020, 8:34 PM

Currently out output is different from GNU readelf

out -> our

This revision is now accepted and ready to land.Jan 23 2020, 8:34 PM
jhenderson accepted this revision.Jan 24 2020, 1:43 AM



Not directly related to this change, but I'd like to see this changed to a warning at some point. It's annoying that we can't dump the rest of the table in this case, and there's no fundamental reason why we can't.

grimar marked 2 inline comments as done.Jan 24 2020, 2:57 AM
grimar added inline comments.

I fully agree. Will fix.

grimar edited the summary of this revision. (Show Details)Jan 24 2020, 3:29 AM
This revision was automatically updated to reflect the committed changes.
grimar marked an inline comment as done.