47 ms·
That's awesome, can you give a quick rundown here, or have you blogged about it? One question I have is around symbol resolution. Can the in memory piece of tcc
by marktangotango 10y ago
That's awesome, can you give a quick rundown here, or have you blogged about it? One question I have is around symbol resolution. Can the in memory piece of tcc compiled code see all the symbols in your program (ie the host exe) for example?
- buserror 10y agoI haven't posted about it yet, as I wanted to clean up the branch before I do, and I ran out of time; work to catch up and so on :-) libtcc is /massively/ clever, it will 'link back' to your (exported) ELF symbols automatically. Basically it links the piece of code to your current running process, with all it's libs etc. So if you have a function blob(int); in your main program, just call it from the C you generate, and it'll Just Works. For my own purpose, I decided to trim down the headers I would have to include in the generated C and made some sort of simpler 'trampoline', but it's not strictly necessary.