Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flexlink should not use constant base address for Cygwin64 #50

Closed
dra27 opened this issue Jan 11, 2018 · 1 comment
Closed

flexlink should not use constant base address for Cygwin64 #50

dra27 opened this issue Jan 11, 2018 · 1 comment

Comments

@dra27
Copy link
Member

dra27 commented Jan 11, 2018

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:

  • Some kind of DLL flag which Cygwin's rebase utility recognises as requiring a 32-bit compatible base address (this needs more detail - especially as regarding how the present Cygwin64 ocaml package gets around this)
  • flexlink needs to do whatever the linker would normally do to determine a "random" base address for the DLL, but with the added caveat of keeping it in a 32-bit range. Having done this, the change may as well be used for the MSVC64 and mingw64 ports, but it's not as critical.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant