Page MenuHomePhabricator

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

Authored by Higuoxing on Fri, Sep 4, 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.Fri, Sep 4, 12:58 AM
Higuoxing requested review of this revision.Fri, Sep 4, 12:58 AM
jhenderson added inline comments.Fri, Sep 4, 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.Fri, Sep 4, 1:42 AM

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

jhenderson added inline comments.Fri, Sep 4, 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)Fri, Sep 4, 2:56 AM
Higuoxing marked 2 inline comments as done.
jhenderson accepted this revision.Fri, Sep 4, 3:33 AM

Besides, this patch

Should be "In addition, this patch"

LGTM.

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