RFC: Mark dylib/mach-o on Mac OS X

Ken Thomases ken at codeweavers.com
Tue Aug 27 17:55:18 CDT 2013


Hi,

On Aug 27, 2013, at 4:08 PM, André Hentschel wrote:

> @@ -94,6 +95,9 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size)
>         if (len > 3 && !strcmpiW(&out[len - 3], S_DotSoW) &&
>             (l = match_ext(out, len - 3)))
>             strcpyW(&out[len - l - 3], S_ElfW);
> +        else if (len > 6 && !strcmpiW(&out[len - 6], S_DotDylibW) &&
> +            (l = match_ext(out, len - 6)))
> +            strcpyW(&out[len - l - 6], S_MachoW);

This isn't sufficient.  Even though the native dynamic library extension is .dylib on Mac OS X, Wine actually still uses .so as the extension for its libraries.  For example, kernel32.dll.so.

So, you have to change the earlier branch matching S_DotSoW, too.  Probably, it should just use "#ifdef __APPLE__" to pick the tag to apply, as module_get_type_by_name() does in a similar situation.

You do still need the test for .dylib for platform libraries.


> +            dbg_printf("MACH-O\t");

I think it should be "Mach-O", not "MACH-O".

> +                dbg_printf("MACH-O\t");

Same here.

I believe you missed a check for "<elf>" in symbols_info_cb() in symbol.c.  I'm not sure under what circumstances that would be important, though.

-Ken




More information about the wine-devel mailing list