Changing Mach-O app load behavior
Changing Mach-O app load behavior
- Subject: Changing Mach-O app load behavior
- From: Eric Shepherd <email@hidden>
- Date: Tue, 9 Aug 2005 11:41:40 -0400
I'm in the odd position of needing to intervene in the process of
loading a Mach-O application's binary. I need to be able to load it
into memory, do some preprocessing on it, then link and run it. I
need to be able to do this without requiring any changes to an
existing application; the goal is to be able to wrap an existing
program to control its use during a demo period.
I've looked at things like NSCreateObjectFileImageFromMemory, which
sounds perfect, except it only works on bundles, which apparently
doesn't include standard applications. Rebuilding an app with the -
bundle flag to the linker makes it "almost" work, in that the app
launches but the menu bar never appears, and keystrokes don't go to
its windows.
Does anyone have any thoughts on how this could be done? I've
grabbed the dyld code, thinking I could create a custom version of
dyld that would actually work for standard apps, but even unmodified,
dyld doesn't actually compile and link on Xcode 2.1.
If anyone has any thoughts, please let me know!
Thanks,
--
Eric Shepherd
Owner
Syndicomm
http://www.syndicomm.com
_______________________________________________
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