This is an archive of the discontinued LLVM Phabricator instance.

yaml2obj: Handle NT_* string values in for ELF note types
ClosedPublic

Authored by arichardson on Feb 3 2021, 7:20 AM.

Diff Detail

Event Timeline

arichardson created this revision.Feb 3 2021, 7:20 AM
arichardson requested review of this revision.Feb 3 2021, 7:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2021, 7:20 AM

Could you write a yaml2obj test that uses one or two of those NT values (as well as showing that the hex version works too), please? There's probably already a test that uses hex values for notes, so that would be the one to expand.

llvm/lib/ObjectYAML/ELFYAML.cpp
76

Nit: here and most comments below, add a trailing full stop.

arichardson added inline comments.Feb 4 2021, 1:27 AM
llvm/lib/ObjectYAML/ELFYAML.cpp
76

I coped those from ELF.h, will add full stops there too.

jhenderson accepted this revision.Feb 4 2021, 1:37 AM

LGTM, with one optional suggestion.

llvm/test/tools/yaml2obj/ELF/note-section.yaml
310

Alternatively, -x .note.foo would be enough. Not sure which is simpler.

This revision is now accepted and ready to land.Feb 4 2021, 1:37 AM
This revision was landed with ongoing or failed builds.Feb 9 2021, 8:59 AM
This revision was automatically updated to reflect the committed changes.