This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Moving the default cygwin.dll load location


There really isn't a sensible value AFAIK.
The best bet is to make use of bind.exe, and rebase.exe that come with
the Win32SDK.

Rebase:
	Reads a series of DLL's and make sure the base addresses of all
the DLL's don't conflict.
	If necessary rebasing the DLL's so they don't have conflicting
base addresses.

Bind:
	Bind is a command-line tool that you can use to compute
addresses of exported DLL functions. 

	The linker stores addresses of exported DLL functions in a table
that is separate from the table that contains the names of the exported
DLL functions. Calls to exported DLL functions are made using an
indirect jump through the table that contains the addresses. You can
minimize load time by using Bind to bypass this lookup. Bind your
executable with all of your DLLs, plus the system DLLs, by running Bind
once you have installed the application on the computer where you will
be running it.

The idea behind these 2 programs is something like this:

After building the program:
Run rebase.exe on the DLL's associated with your program.

While installing the program:
Run rebase on the DLL's associated with your program. (Also including
stuff that's in winnt\system32 woudn't be a bad idea either.)
Run bind on your executable images.

Unfortunately those 2 files don't appear to be redistributable as far as
I can tell.. :(
On the up side however.. The functionality in rebase.exe and bind.exe
both come from the IMGHLP.DLL.
In particular: ReBaseImage, and BindImageEx.

Hope this helps,

Bill Tutt
billtut@microsoft.com
Not speaking for Microsoft, just myself.

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]