Log in

View Full Version : Relocations editor?


neviens
February 1st, 2002, 16:16
Hi all!
How to edit relocations of PE file? I have a problem with
insertion of emulation code in haspvb32.dll . When dll is
loaded, my code area becomes corrupted because of
relocations at this place (hasp api). So far I found, that
simple deleting of affected RVAs with hexeditor in .reloc
section don't work - seems it's structure is more complicated.
Neviens.

DakienDX
February 1st, 2002, 16:59
Hello neviens !

If you don't know exactly how relocations work, I would suggest you to read some information about it. Here is an URL to Iczelion's Win32Asm Assembly Homepage. http://spiff.tripnet.se/~iczelion/files/pe1.zip

If you already know the structure of relocations, you should be able to remove the ones needed. Remember 3xxxh = relocate the entire 32bit of the address, 0xxxh = don't relocate this address. But remember, you code could also need relocation.

neviens
February 4th, 2002, 12:24
Thanks DakienDX!
Replaced necessary 3XXXH with 0XXXH and .dll works as
expected now.
Neviens.