Ticket #166 (new task)

Opened 1 year ago

Last modified 1 year ago

Mach-O executable file format

Reported by: nneonneo <nneonneo@gmail.com> Assigned to: haypo
Priority: normal Milestone:
Component: parser Keywords:
Cc:

Description

Considering that there already parsers for the executable types for two major OSes (ELF for Linux, PE for Windows), why not add one more, for Mac OS X/Darwin?

Mach-O file format is relatively simple but uses many enums. There are a few different kinds of files: archive (magic CA FE BA BE), 32-bit (magic FE ED FA CE or CE FA ED FE, depending on endianness of processor), 64-bit (magic FE ED FA CF, or CF FA ED FE).

The format is completely detailed at http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/index.html.

Attachments

hello.o (8.7 kB) - added by nneonneo <nneonneo@gmail.com> on 07/20/07 19:12:25.
hello.o object file, dual-architecture
hello (29.6 kB) - added by nneonneo <nneonneo@gmail.com> on 07/20/07 19:12:54.
hello executable file, dual-architecture (i386/ppc)

Change History

07/20/07 19:11:59 changed by nneonneo <nneonneo@gmail.com>

I will attach two files (hello.o and hello). Both are compiled forms of the following program:

main(){printf("hello world\n");}

hello.o is compiled using

gcc -c -arch i386 -arch ppc hello.c

hello is compiled using

gcc -arch i386 -arch ppc hello.c -o hello

07/20/07 19:12:25 changed by nneonneo <nneonneo@gmail.com>

  • attachment hello.o added.

hello.o object file, dual-architecture

07/20/07 19:12:54 changed by nneonneo <nneonneo@gmail.com>

  • attachment hello added.

hello executable file, dual-architecture (i386/ppc)


Add/Change #166 (Mach-O executable file format)