This is an archive of the discontinued LLVM Phabricator instance.

[MachOYAML] Allow handcrafting custom contents for DWARF sections.
ClosedPublic

Authored by Higuoxing on Sep 4 2020, 12:58 AM.

Details

Summary

This patch enables users to handcraft custom contents for DWARF
sections. If we specify the contents of DWARF sections both in the
'DWARF' entry and the 'content', yaml2obj will emit an error message.
In addition, this patch helps remove the restriction that only the
content of sections whose segname are __DWARF can be specified in the
"DWARF" entry.

Diff Detail

Event Timeline

Higuoxing created this revision.Sep 4 2020, 12:58 AM
Higuoxing requested review of this revision.Sep 4 2020, 12:58 AM
jhenderson added inline comments.Sep 4 2020, 1:18 AM
llvm/lib/ObjectYAML/MachOEmitter.cpp
288

Seems like removing this is unrelated to the patch description? Possibly it just means you need to add a comment to the description saying something like "this allows us to remove a limitation..."

Higuoxing updated this revision to Diff 289895.Sep 4 2020, 1:42 AM

Add a comment saying why we don't check the segname.

jhenderson added inline comments.Sep 4 2020, 2:06 AM
llvm/lib/ObjectYAML/MachOEmitter.cpp
288

The comment is good, but I was actually referring to the patch description, which doesn't explain what we are actually allowing now here.

Higuoxing edited the summary of this revision. (Show Details)Sep 4 2020, 2:56 AM
Higuoxing marked 2 inline comments as done.
jhenderson accepted this revision.Sep 4 2020, 3:33 AM

Besides, this patch

Should be "In addition, this patch"

LGTM.

This revision is now accepted and ready to land.Sep 4 2020, 3:33 AM
Higuoxing edited the summary of this revision. (Show Details)Sep 4 2020, 7:40 AM