Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-03-2005, 18:21
arnix arnix is offline
Friend
 
Join Date: Feb 2005
Posts: 68
Rept. Given: 11
Rept. Rcvd 18 Times in 7 Posts
Thanks Given: 2
Thanks Rcvd at 6 Times in 4 Posts
arnix Reputation: 18
Relocations Directory

Hello, I'm coding a simple packer, I want it to pack also DLL files, so I tryed to find anything about relocations directory' structure, but nothing was found (I've tryed forum's search engine too, two pages result on "relocations", but nothing about structure..). I researched it manually - comparing its' hex values with LordPE values, ok it has very simple structure and it will be very easy to do what I want, but I still can't understand the meaning of one 1-byte item (EDIT: plz see the note in the end) of the structure, LordPE identifies it as "Type". In all dll-s that i've looked this value was 3 (LordPE show HIGHLOW(3)). but just for interest i tryed to change these values (each address that must be relocated has this item) to other all available values (0 - F) and here is how LordPE idendifies their types:

0 - ABSOLUTE(0)
1 - HIGH(1)
2 - LOW(2)
3 - HIGHLOW(3) <- this one is used in all PE's i've seen
4 - HIGHADJ(4)
5 - MIPS_JMPADDR(5)
6 - SECTION(6)
7 - REL(7)
8 - ??
9 - IA64_IMM64(9)
A - DIR64(10)
B - HIGH3ADJ(11)
C - ??
D - ??
E - ??
F - ??

So, a question - what it is for? And, are there any differences when relocating the addresses "manually" (not by System's PE Loader) if this value is not 3 (HIGHLOW(3)) ?
Thanks.

EDIT:
ahh, of course it isn't 1 byte value, it's 4-bit value ok, there is a WORD, like this 34AB, it means type 3 (HIGHLOW(3)), and the address which needs to be relocated is BaseAddress + 04AB (BaseAddress is also in the structure, must be alligned to 1000h). Example 2: 4ADD - type - HIGHADJ(4), relative address - 0ADD. brr..

Last edited by arnix; 06-03-2005 at 18:52.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to patch a dll with relocations? aijundi General Discussion 2 10-13-2022 03:08
Armadillo DLL Relocations.. xzz General Discussion 4 09-28-2004 02:17
pecompact, dll, relocations ftw General Discussion 2 07-25-2004 07:49


All times are GMT +8. The time now is 09:00.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )