dll base address relocation

1. Definitions

Base address relocation: When multiple dll dynamic library compiled together into a single exe file, exe and dll each has a default base address when the loader loads the exe, dll fact, certain groups will occur address change, so when finished loading, not the same as before after dll inside and loading instructions, resulting in an image file machine code instructions (including hard-coded addresses) not the same as the loads, this should be by a group rebase address relocation.

2, often appear in local & common printing the wrong way

Address often appear:

(1) git update code when

When (2) mingw compiled code

(3) Other operating behavior code

Common printing the wrong way:

xxxxxxxx....VirtualAlloc pointer is null, Win32 error 487

xxxxxxxx....Couldn‘t reserve space for cygwin‘s heap, Win32 error 0

and many more

3, the solution

Since the base address basically editor tool or bin below msys-1.0.dll library results, it is necessary that the base address relocation.

Rebase tool can be downloaded online or to install their own problems corresponding error corresponding editor or above tools will bring their own rebase.exe, can be found below in the appropriate directory.

eg:

error 0 Solution:

rebase.exe -b 0 0x50000000 xxxxxx\bin\msys-1.0.dll

error 487 Solution:

rebase.exe -b 0x760000000 xxxxxxx\bin\msys-1.0.dll

 

 

 

Published 23 original articles · won praise 4 · Views 9972

Guess you like

Origin blog.csdn.net/hxp1994/article/details/95385483