Relocation part II & general improvements

I have split the code and data memory areas now. The relocation table has allowed me to do this without any real problems. It's nice!

I also implemented some general improvements. I added an x86 disassembler to debug the compiled code on run-time. The library I used is diStorm. This simplifies the process immensely because until now I had to copy/paste the hex dump into a disassembler every time. Now it just shows me the disassembly in the log, like this:

Because the project is getting larger and larger, I also felt the need for a proper configuration system. I used libconfig for this. You can see an example config file here. As you can see, this configuration library allows for a much more extensive configuration than for example a .INI file (which the original Pessego VM uses). It is also more readable than XML, and it has more formatting options than JSON.

When I implemented this library, I got annoyed by the fact that I now had 2 configuration files, one for log4cpp and one for pjitgen. I solved this by making a minor change to log4cpp and allowing me to put log4cpp configuration in the general configuration file. The pjitgen config currently looks like this:

I'm not sure what I will be posting next. I'm having issues with the relocation syscall invocation in combination with a jump to a pointer at a certain address though. Perhaps I will make another post about that soon.

Show Comments