Created
May 27, 2012 15:31
-
-
Save mafice/2814771 to your computer and use it in GitHub Desktop.
convert Mach-O to plain binary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# install GNU Binutils | |
# | |
# cd /tmp | |
# curl -O http://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.gz | |
# tar vxf binutils-2.22.tar.gz | |
# cd binutils-2.22 | |
# ./configure | |
# sudo make install | |
# | |
clang -arch i386 -c kernel.c | |
ld -arch i386 -e _startup -o kernel.macho kernel.o | |
objcopy -Obinary kernel.macho kernel.bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment