At 10:06 AM 04/18/2000, William A. Rowe, Jr. wrote:
> > From: Tim Costello [mailto:timcostello@ozemail.com.au]
> > I get a bad feeling from the fact that base addresses in all
> > the project files are now hard-coded, because it seems like
> > either quite a maintenance effort or the sort of thing that
> > will be overlooked in time. I've been using the following patch
> > for a little while to rebase all Apache DLLs after compilation
> > using EDITBIN - it calculates new addresses automatically given
> > a ceiling address, currently set to 0x70000000.
>
>I think the concept is EXCELLENT! I share your concerns that coders
>forget as they add new modules, or a module grows by leaps and
>bounds and collides with the next.
>
>I'm mostly concerned though, that the original addresses in the
>exports .lib file may not be touched... are they?
I don't think so.
In the Project Settings, Link Tab, Base Address, instead of putting
the actual address, you can specify a filename that contains all the
base addresses for all the modules. In that file, you can specify
the expected maximum size for that module. If the module gets bigger
than that size, the linker warns you about it, so you can update the
offsets. The last time I laid out a set of base addresses, I rounded
the size up to the next 0x10000, and then added another 0x10000 for
growth room. This will at least warn you about collisions at link
time instead of run time. It won't do anything for missing modules,
but at least there is a single text file that people can check to see
that all of them are taken care of.
--
Greg Marr
gregm@alum.wpi.edu
"We thought you were dead."
"I was, but I'm better now." - Sheridan, "The Summoning"
|