2009/5/20 grischka <[email protected]>: > Changes: > > - [...] > - tcc_relocate now copies code into user buffer > - [...]
I'm in the process of updating a program that links to libtcc, and this change is quite annoying. It would have been nice to keep the old tcc_relocate as-is (put the code in a buffer related to the TCCState), and add another API to copy code in the user buffer. On the other hand, assuming that's the way tcc is going to stay, it feels weird to pass the TCCState to tcc_get_symbol, while the returned address is in fact dependent on the buffer passed to tcc_relocate. Instead, it would feel more natural to copy the metadata in the user buffer, and pass it (without the TCCState) to tcc_get_symbol. Finally the lifetime of the memory block passed to tcc_relocate is not clear to me. Can I delete the TCCState and still use symbols created by it as long as the memory block is valid ? Is freeing the block enough to free any resource (OS handles, temporary files, etc.) that is needed to support the relocated code ? And last, but not the least, since tcc_relocate API changed, is there a define in the libtcc headers to detect which version is exposed ? _______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
