Search code examples
delphiexecutablepackingdemoscene

kkrunchy - how to get rid of the tls data in a Delphi executable?


Just for fun and giggles I'm trying to create a 64k intro in delphi. One of the best executable packers for applications of this size is kkrunchy by Farbrausch. However, when I run it on an (otherwise empty) Delphi executable, I get the following output

 - ERROR: files with exports or tls data are not supported

I'm guessing with a Delphi executable both could be the culprit, and I have no real troubles putting in the sweaty hours trying to figure out which one it is and post modifying the executable or something similar... but perhaps one of you already knows, or even has some information on how to circumvent this problem?


Solution

  • Exports are for DLLs; it's not likely that your EXE is doing any exporting. TLS, on the other hand, is thread-local storage. If you have any threadvar variabled declared somewhere, that might be causing it. Also, I think TLS is uses in the built-in exception handling, but I'm not clear on all the details. If that's it, then you might not be able to use this packer at all.