Sunday, June 13, 2010
tbcload and tclcompiler
On my journey to implement a bytecode assembler for Tcl, I found out that my work is not going to be lonely. tbcload and tclcompiler are some Tcl tools that are used for producing and loading Tcl bytecode files (if you haven't already guessed from the names). They do some obfuscation and deobfuscation also. That part I am not really interested in. For me the important part is tclcompiler is writing a compiled Tcl script to a file in a certain format and the tbcload is reading this file format and "source"ing it into the Tcl interpreter even though the script source is non-existent. So my next step is understanding how tbcload and tclcompiler work. Luckily these tools have gotten opensource with TclPro. Even though the project has not been maintained since early 2003, for me that is not a problem... The problem is even though I downloaded the Mac version when I try to use the package in Tcl, I am getting wrong architecture error :).. and trying to compile it didn't really work since a header file is missing in the source :).. This actually inspired me to look for newer versions of these tools. I realized my Mac had tbcload 1.7 but a Google search for it won't get you anywhere. The best place to look for is the Apple Opensource. They have the latest version and the source.. For the tclcompiler, I don't know what to do yet, I downloaded the Activestate Tcl Dev Kit Trial, so I can compile and analyze the compiled files but for compiling source I guess I'll go with the tclcompile.c which comes with the Tcl source.. Will be back later..
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment