This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj] - Improve handling of the SHT_GROUP section.
ClosedPublic

Authored by grimar on Oct 22 2019, 3:57 AM.

Details

Summary

Currently, when we do not specify "Info" field in a YAML description
for SHT_GROUP section, yaml2obj reports an error:
"error: unknown symbol referenced: '' by YAML section '.group1'"

Also, we do not link it with a symbol table by default,
though it is what we do for AddrsigSection, HashSection, RelocationSection.
(http://www.sco.com/developers/gabi/latest/ch4.sheader.html#sh_link)

The patch fixes the missings mentioned.

Diff Detail

Event Timeline

grimar created this revision.Oct 22 2019, 3:57 AM
grimar updated this revision to Diff 226629.Oct 28 2019, 3:40 AM
  • Rebased.
jhenderson accepted this revision.Oct 28 2019, 7:21 AM

LGTM, with two nits.

test/tools/yaml2obj/section-link.yaml
48

if it is exists -> if it exists

49

Delete "use". I'd also add "Also" to the start of this sentence: "Also, check we..."

This revision is now accepted and ready to land.Oct 28 2019, 7:21 AM
This revision was automatically updated to reflect the committed changes.
grimar marked 2 inline comments as done.
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2019, 1:17 AM
Herald added a subscriber: hiraditya. · View Herald Transcript