Re: generating mach-o executable files by hand
Re: generating mach-o executable files by hand
- Subject: Re: generating mach-o executable files by hand
- From: Terry Lambert <email@hidden>
- Date: Tue, 6 Jan 2009 19:33:30 -0800
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).
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden