MTOC(1)
MTOC(1) π β¨
okay bestie, welcome to the mtoc(1) page from the General Commands Manual π. This is your no-cap guide to turning a Mach-O file into a PECOFF file, and yes, we're keeping every flag and every weird little detail. π«Ά
π NAME π
mtoc β convert a Mach-O file to a PECOFF file. slay.
β¨ SYNOPSIS β¨
mtoc [ -subsystem type ] [ -section_alignment value ] [ -align value ] [
-version major.minor ] [ -d filename ] input output
you hand it an input and an output, and the flags in between are the optional extras. π
πΈ DESCRIPTION πΈ
mtoc converts the input EFI file built as a Mach-O file into an output PEFOFF file. (yes, PEFOFF β that's the exact spelling on this page, iykyk π).
the flags, in order, looking iconic:
-subsystem typeβ picks the EFI subsystem type.typecan beapplication,boot, orruntime. the default isapplication. π-section_alignment valueβ sets thePECOFFsection alignment.valueis a hexadecimal number that must be an integral power of 2. the default is the Mac OS X target pagesize (1000hex). this value should match the value used for-segalignwhen linking the Mach-O file. β¨-align valueβ sets thePECOFFfile and section alignment.valueis a hexadecimal number that must be an integral power of 2. the default is400hex. this value should match the value used for-segalignwhen linking the Mach-O file. π-version major.minorβ sets thePECOFFmajor and minor versions for theMajorImageVersionandMinorImageVersionfields. π-d filename"β sets the filename to be used to create a debug directory entry with. (and yes, that trailing"is literally in the option name on the page β keeping it exactly, bestie π).
lowkey important:-section_alignmentand-alignboth want hexadecimal values that are integral powers of 2, and both should match the-segalignvalue you used when linking the Mach-O file. no cap. π₯
xoxo, this page is brought to you by Apple, Inc., dated July 21, 2017, and it's still the MTOC(1) manual page ππ«Ά
π¦ where this page comes from
- nixpkgs unstable: cctools 1010.6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms