Re: Loading a shared library directly from inside of a ZIP file
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com JP On 20 Jan 2006, at 07:45, Martin Knapp-Cordes wrote: Hi, Is there a 'public' interface (with a different name) that will replace the interface: void *dlopen(const char *filename, int flag); by say: void *dlopen_new(int fd, void *start, size_t length, int flag); This is motivated by the mmap interface: The idea is that you are given a triplet: (name,offset,length) where name is file descriptor for the ZIP file (int fd), and the offset (void *start) is the start of the shared library in the ZIP file, and length (size_t length) is the length of the shared library. Note that dlopen() under the hood does a mmap. If there isn't, is the only recourse, to 'hack' the source or are there some other ideas or published solutions. The solution of making a copy into the filesystem first and using the old interface is NOT acceptable. Sincerely, Martin Knapp-Cordes --------------------------------------------------------------- | Martin Knapp-Cordes martin@mathworks.com | | The MathWorks, Inc. http://www.mathworks.com | | 3 Apple Hill Drive Natick, MA 01760 | | Tel: (508) 647-7321 Fax: (508) 647-7015 | --------------------------------------------------------------- -- John Davidorff Pell johnpell@mac.com _______________________________________________ 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... How would you decompress the library? Is it in the ZIP file uncompressed? the dlopen() family of calls are *extremely* simple, so "hacking" them would not be a bad idea since they are "hacks" to begin with. They're just wrappers around native calls anyway. Check out the dlcompat library (which Tiger includes). void * mmap(void *start, size_t length, int prot , int flags, int fd, off_t offset); _______________________________________________ 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/jpell.lists% 40mac.com This email sent to jpell.lists@mac.com This email sent to site_archiver@lists.apple.com
participants (1)
-
John Davidorff Pell