This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] MachO -- correctly dump section field 'Reserved3'
ClosedPublic

Authored by davide on Aug 31 2015, 3:25 PM.

Details

Summary

I stumbled upon this fileld while looking at macho-dump -- and it seems llvm-readobj completely ignores it. I wasn't able to gather many informations about it, I just see that MCWriter unconditionally sets this to zero only for 64-bits object.

Jim, Nick, I hope this is the right way of handling it. I'm also curious about what this is supposed to be used for :)

Diff Detail

Event Timeline

davide updated this revision to Diff 33638.Aug 31 2015, 3:25 PM
davide retitled this revision from to [llvm-readobj] MachO -- correctly dump section field 'Reserved3'.
davide updated this object.
davide added reviewers: kledzik, grosbach, rafael.
davide set the repository for this revision to rL LLVM.
davide added a subscriber: llvm-commits.
rafael accepted this revision.Aug 31 2015, 7:42 PM
rafael edited edge metadata.

Well, even it it has to always be 0, we have to be able to test its value, so LGTM.

This revision is now accepted and ready to land.Aug 31 2015, 7:42 PM
davide added a subscriber: davide.Sep 1 2015, 8:32 AM

No objections :) Going to su
Still -- I'm curious if anybody more

davide added a comment.Sep 1 2015, 8:33 AM

No objections :) Going to submit this now.
Still -- I'm curious if anybody more familiar with MachO can explain
what's the need of this field.

davide closed this revision.Sep 1 2015, 9:51 AM
grosbach edited edge metadata.Sep 1 2015, 10:59 AM

Pretty sure it's just to force the structure size to be a multiple of 64-bits.