Re: [patch/rebase] Add a rebase database to keep track of DLL addresses
On Wed, Jun 29, 2011 at 05:36:15PM +0200, Corinna Vinschen wrote:
>Hi Jason, Hi Chuck,
>
>
>here's a patch which adds a new functionality to rebase. If you add the
>-s parameter to the command line, rebase will utilize a file
>"/etc/rebase.image_info" to keep track of DLL addresses. This allows
>easily to rebase new DLLs so that they don't collide with other DLLs
>which already have been rebased. But the algorithm doesn't rely only
>on the database info. It performs a couple of checks to test if the
>database is actually in a state which matches reality. For instance,
>if you installed a new distro DLL, say, cygz.dll, and the new DLL has
>another address than the one in the database, cygz.dll will be rebased
>back to its spot as noted in the database if possible, even if it
>has not been specified on the command line.
>
>So the database allows to keep an installation in a stable state, plus
>it allows to add DLLs to the database and rebase it so it doesn't collide
>with already existing DLLs.
>
>When you use the -s option the first time, you *must* specify a base
>address, like this:
>
> rebase -s -b 0x70000000 -T distro-dll-list
>
>In subsequent calls you should omit the base address. In that case
>rebase will use the base address as stored in the database. However,
>you can also use another base address. This will override the base
>address in the database and start the rebasing from scratch, with all
>files in the database plus all files given on the command line.
(Continue reading)