Search code examples
c++cportable-executable

PE problem - with a packer


I am trying ti make my own packer, and my packer works fine with executable compiled VC++ 6, but when I try to pack executable compiled with VC++ 8, the executable will crash. So I wanted to know if there is any change in the PE structure in the new versions of C++?


Solution

  • There has been no change to the PE File format, and as commenters above point out it is not related to your problem.

    It sounds like your packer is dependent on the VC++6 runtime libraries and as such when it unpacks something that is expecting VC++8 libraries bad things happen. The solution would be to make your packer runtime library independent.

    BigBoote's "How to write your own packer" addresses this and suggests implementing your own trivial runtime.

    http://www.stonedcoder.org/~kd/lib/61-267-1-PB.pdf