Question: How to link to get loaded at a fixed address (0x7bf0000) each time in a Solaris environment

Chris McKillroy mckillroy at
Thu Nov 15 06:12:07 CST 2007

Hello everybody,

I recently run into the following problem:

I tried to use a DLL injection into a process started by a controller
Process using an external code hooking dll
to achieve some sort of datalink.
In a windows environment the solution works stable and perfectly.
(Controller Process NWNX4 as provided by, child process
nwn2server.exe, as provided by Obsidian - all legal and intended use).

Under Solaris10 (wine version 0.9.49) the child process regularly
crashed upon creation, respectivley when the dll was injected.

After a lengthy debugging session it appeared that
always gets loaded to a varying address by the runtime linker, which
seems to crash the whole procedure.

I succeeded making a which gets loaded to a constant
address in Solaris by using the tool "crle" on Solarice, but I
couldn't control the address -
it appeared to be somewhat arbitrary which base address was chosen.
The crash problem remained.

I would like to try if the procedure would work if I could get a which always gets loaded to the same address
0x7bf0000, as in standard windows.

After a posting to the Solaris Linker mailing list we got an answer
which was designed to work with the SUN toolchain.

My question now is:
How would I have to change things (makefile or whatsever)  to get linked in a way to achive that it will be loaded to
address 0x7bf0000each time under Solaris.


More information about the wine-devel mailing list