Cómo determinar si un dylib OS X estaba vinculado con -flat_namespace
-
23-09-2019 - |
Pregunta
Tengo un tercero dylib OS X que estoy usando en mi aplicación y no tienen fácil acceso a su creador. Me gustaría para determinar si estaba relacionado con -flat_namespace. ¿Es eso posible? Si es así, ¿cómo?
Solución
Ejecutar otool -hV
en la biblioteca. Si no ve TWOLEVEL
, a continuación, que estaba vinculada con -flat-namespace
. Por ejemplo:
twolevel.dylib:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 DYLIB 8 672 NOUNDEFS DYLDLINK TWOLEVEL NO_REEXPORTED_DYLIBS
frente
flat.dylib:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 DYLIB 8 672 DYLDLINK NO_REEXPORTED_DYLIBS
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow