ocaml / flexdll

a dlopen-like API for Windows
Other
100 stars 30 forks source link

flexlink should not use constant base address for Cygwin64 #50

Closed dra27 closed 3 years ago

dra27 commented 6 years ago

flexlink passes --image-base 0x10000 to the linker for Cygwin64 in order to ensure that relocations are always within a 32-bit range. This is causing problem when multiple DLLs are loaded by a single process (especially dllthreads.so and dllunix.so).

There is also the problem that nothing prevents Cygwin's rebaseall from re-setting the base address to something higher.

I think that two changes are ultimately required:

No solutions so far, but this issue keeps cropping up from time-to-time and as far as I know it's not being tracked anywhere.

dra27 commented 3 years ago

This was fixed in #89