init() fini() and end are not part of mach-o.
Initialisation are already call by dlopen and previous version
from pierre make recall initialisation stuff for all dlls each time you load one.
So __wine_register_dll_16 failed due to assertion.


SizeOfImge can be compute like this :
char *addr;
stracut mach_header machHeader;
struct load_command *loadCmd;
struct segment_command *segmentCmd;

char dllName[MAXPATHLEN];
unsigned long i;
unsigned long count = _dyld_image_count();
unsigned long offset;

sprintf(dllName, \"%s\", %s /* spec->file_name */);

for( i=0; i < count); i++)
    if(_dyld_get_image_name(i), dllName)
    {
        unsigned long j;
        machHeader = _dyld_get_image_header(i);
        addr = (char *) machHeader;
        offset = sizeof(struct mach_header);

        for (j = 0; j < machHeader->ncmds; i++)
        {
            loadCmd = (struct load_command *) (addr + offset);
            if (loadCmd->cmd != LC_SEGMENT)
            {
                offset += loadCmd->cmdsize;
                continue;
            }
            segmentCmd = (struct segment_command *) (addr + offset);
            nt_header.OptionalHeader.SizeOfImage += segmentCmd->vmsize;
            offset += loadCmd->cmdsize;
        }
    }
    
__wine_dll_register( &nt_header, %s );


if you want i'll add this for computing image size.

emmanuel

Le 19 avr. 04, � 23:35, Alexandre Julliard a �crit :

emmanuel maillard <[EMAIL PROTECTED]> writes:

Sorry my previous mail include a broken patch
This one is the good one.

Changelog :
        Fix spec32 file generation for Darwin

Why are you removing the init code and the SizeOfImage thing? This doesn't look right at all.

--
Alexandre Julliard
[EMAIL PROTECTED]


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Darwine-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/darwine-devel


Reply via email to