Ove Kaaven ovehk@ping.uio.no writes:
I'm not sure, what happens if opengl32.dll.so or d3d8.dll.so links against a libGL.so that links against libpthread.so that overrides fork() ? Would RTLD_NEXT then not go to the pthread fork() ? Or perhaps, it seems, you grab the entry point before those dlls are loaded. Hmm.
Yes, that's the idea. By the time we do PTHREAD_init_done only the wine binary and ntdll.dll.so should be loaded, all the rest will be loaded later. I guess it would be possible to break it by doing an LD_PRELOAD of a library linked with pthreads, but I don't think we need to worry about that.