Hi. I came across this little bug. It's not a showstopper for me but I thought I'd report it in case somebody knows a quick fix.
example:
c.c:
#define x ((void(*)(void))0)
void call_x() { x?x():y(); }
compiling and attempted linking with
tcc -fPIC c.c -c && tcc -shared -o so.so c.o
on x86_64 (untested elsewhere) gives
c.o: error: Invalid relocation entry [ 6] '.rela.text' @ 0000000c
If gcc/clang is used instead of tcc for the compilation part, the linking part or both, the linking works.
Best regards,
Petr Skocik