Hi Grischka,

> That is not part of tcc_add_symbol, Instead you need an additional
> selective relocation for just one symbol, such as:

>       tcc_relocate_symbol(s, "add", add1Ptr, add2Ptr);

Right, this makes sense, I need to search for add1Ptr rather than "add" and
replace add1Ptr with add2Ptr.  I am not familiar with the memory layout libtcc
generated so any tips on where I should start looking for the function pointers
would be appreciated.

> You could change the linker to generate function pointers automatically,
> Basically you'd link the program to itself as if it were in an external
> DLL.  Non-trivial, also.

Hmm interesting thought.  I will try option 1 first.

Thanks for you help

Henry

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to