This is an archive of the discontinued LLVM Phabricator instance.

[MachO] Pad section data to pointer size bytes
AbandonedPublic

Authored by pguo on Feb 7 2020, 5:54 PM.

Details

Reviewers
gchatelet
pete
pcc
Summary

Pad macho section data to pointer size bytes, so that relocation table
and symbol table following section data will be pointer size aligned.

Event Timeline

pguo created this revision.Feb 7 2020, 5:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2020, 5:54 PM

I don't know much about Mach object but code wise LGTM.
You should get approval from someone more knowledgeable than me though.

pete accepted this revision.Feb 10 2020, 9:27 AM

LGTM.

This shouldn't affect the final binary size as the linker is going to probably recreate the relocations and symbol table anyway, but seems fine to align this more in the object files.

This revision is now accepted and ready to land.Feb 10 2020, 9:27 AM
pguo added a comment.Feb 10 2020, 10:26 AM

Thank you for your comments. And could you help me to commit the change since I haven't got the permission yet? Thanks.

pguo updated this revision to Diff 244004.Feb 11 2020, 2:18 PM
  • Fix unit test after changing macho pad bytes.
pguo added a comment.Feb 11 2020, 2:18 PM

Update the patch, fixed unit test failure.

Do you intend to submit this patch?

pguo added a comment.May 20 2020, 2:28 PM

Aditya has helped me to commit the patch. Thank you.

Aditya has helped me to commit the patch. Thank you.

If the patch is submitted already you should mark this patch as "Abandonned" and link to the commit in a comment. Thx!

pguo added a comment.May 29 2020, 3:01 PM

Aditya has helped me to commit the patch. Thank you.

If the patch is submitted already you should mark this patch as "Abandonned" and link to the commit in a comment. Thx!

I see. Thank you.

pguo added a comment.May 29 2020, 3:02 PM

Aditya helped to commit the change with commit ID: bdc3c73454

pguo abandoned this revision.May 29 2020, 3:03 PM