Search code examples
windowsexeexecutableportable-executablerdata

put together .text, .rdata, .data, .code to a exe(cutable) file


I get zip.exe from http://stahlworks.com/dev/index.php?tool=zipunzip I have unpacked the files to:

  • .text
  • .rdata
  • .data

How to connect together through a command line using an external program or without?

copy /B .text+.rdata+.data zip.exe

The above code does not work.


Solution

  • You can't just glue together sections of a PE or ELF file and expect to get a working executable because there's more information needed, namely a number of headers that describe those sections and other important things.

    At any rate, I'm not sure why you're dealing with this in first place. zip.exe downloads just fine from that page. I see no reason to break it only to be unable to later repair it.