This is an archive of the discontinued LLVM Phabricator instance.

[yaml2elf/obj2yaml] - Allow normal parsing/dumping of the .rela.dyn section.
ClosedPublic

Authored by grimar on Apr 17 2019, 6:13 AM.

Details

Summary

.rela.dyn is a section that has sh_info normally set to zero.
And Info is an optional field in the description of the relocation section in YAML.

But currently, yaml2obj would fail to produce the object when
Info is not explicitly listed.

The patch fixes the issue.

Diff Detail

Event Timeline

grimar created this revision.Apr 17 2019, 6:13 AM
jhenderson accepted this revision.Apr 18 2019, 2:06 AM

LGTM, with two nits.

test/tools/obj2yaml/elf-reladyn-section-shinfo.yaml
2

There's some discussion about removing support for long single-dash options in llvm-readobj, so it's probably best to use double dash here (i.e. --sections).

7

need -> needing

41

Nit: needs a trailing full stop.

This revision is now accepted and ready to land.Apr 18 2019, 2:06 AM
This revision was automatically updated to reflect the committed changes.
grimar marked 3 inline comments as done.
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2019, 4:00 AM