View Single Post
  #2  
Old 01-14-2011, 09:03 AM
kao kao is offline
Senior Member
 
Join Date: Sep 2007
Posts: 184
Default

The obvious question here is "why on Earth do you need that?!".

If you care about size that much, just pack file with NETZ, SixxPack or some other pure .NET packer. It will give you bigger savings than getting rid of relocations.

If it's for research, disassemble PEDecoder::CheckFormat, PEDecoder::CheckILOnly and PEDecoder::CheckILOnlyBaseRelocations functions in mscorwks.dll from .NET 2.x. Lidin's book is good but nothing beats the actual implementation.

Btw, who said that you must have relocations in the .reloc section?

Last edited by kao : 01-14-2011 at 09:04 AM. Reason: EDIT: typo
Reply With Quote