

PE2DEX by 0x4e71 
Convert from win32 PE to dex4u relocatable experimental exe

The PE executable must meet some requirements:
- put all code/data in a section called ".dex4u"
- put relocations in a section called ".reloc"

Usage:

Pe2dex input.exe output.drx


Trimming:
Because PE files section are aligned to powers of two (often 4096 down to 512)
you end up with some extra space at the end of the exe.
You can prevent this by putting the "magic" marker 

db "--$$EXE+CUT+HERE$$-",0

at the end of your program and activate the /TRIM option

Pe2dex input.exe output.drx /TRIM

Recommended for FASM (see example file)
Not recommended for C/C++ and other HLL because you never quite know where the 
compiler is going to put stuff.


0x4e71 (news4e71@yahoo.com)

