This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] Extend the output of -elf-section-groups with the field Link
ClosedPublic

Authored by alexander-shaposhnikov on Mar 8 2018, 4:38 PM.

Details

Summary

This diff extends the output of -elf-section-groups (llvm style, gnu unchanged (since it's meant to be compatible with binutils readelf) with the field Link. This change will enable us to use llvm-readobj -elf-section-groups for testing llvm-objcopy's support for groups (instead of -section-data -sections).
Test plan: make check-all

Diff Detail

Repository
rL LLVM

Event Timeline

alexander-shaposhnikov edited the summary of this revision. (Show Details)

I'm thinking that we should really either have both the sh_info and the sh_link fields printed, or neither. At the moment, they're kind of implicit in the "Signature" field, since that is the symbol name for the corresponding symbol. If the name is wrong, then we're pointing at either the wrong symbol table or the wrong entry in that table. I suppose there's not technically anything stopping there being multiple symbols with the same name though, under the right circumstances, so having both would allow us to uniquely identify it. However, printing only the link doesn't uniquely identify it.

Add sh_info as well.

This revision is now accepted and ready to land.Mar 12 2018, 2:45 AM
jakehehrlich accepted this revision.Mar 12 2018, 11:07 AM

LGTM as well

This revision was automatically updated to reflect the committed changes.