Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a shared library directly from inside of a ZIP file



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).

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:

void * mmap(void *start, size_t length, int prot , int flags, int fd,
off_t offset);


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               email@hidden     |
|  The MathWorks, Inc.               http://www.mathworks.com |
|  3 Apple Hill Drive                Natick, MA  01760        |
|  Tel: (508) 647-7321               Fax: (508) 647-7015      |
---------------------------------------------------------------




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/jpell.lists% 40mac.com


This email sent to email@hidden



-- John Davidorff Pell email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Loading a shared library directly from inside of a ZIP file (From: Martin Knapp-Cordes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.