Re: generating mach-o executable files by hand
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Jan 6, 2009, at 1:34 PM, Joel Reymont wrote: I need to generate the Mach-O executable files by hand, without using the linker. It's for a Forth compiler that I'm porting from Linux and the headers need to be generated by hand. I'm trying to tackle "hello world" for starters. I looked at the 12K executable generated by gcc but it seems like there's too much cruft in there. Does anyone have sample code that generates Mach-O exe files without using the linker? You have to use at least *a* linker; if you don't, you won't be able to import the system call stubs from libc/libsystem (and No, you can't just statically link things, since the system call implementations are split between user and kernel space, and many times the parameter lists don't even match what's exposed to user programs). This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert