Hi,
On Thu, 20 Jun 2019, C.J. Wagenius wrote:
Compiling with -shared makes tcc compile ok but the binary segfaults.
Including crtbegin.o (for symbol __dso_handle) and crtend.o (for symbol
__TMC_END__) makes tcc compile ok and the binary works.
$ tcc ../atexit.c /usr/lib/gcc/x86_64-redhat-linux/9/crtbegin.o
/usr/lib/gcc/x86_64-redhat-linux/9/crtend.o
I don't know the right way to fix this in tcc.
Okay, let's bite the bullet and provide it from libtcc1.a on glibc
systems. I've made it so in mob, so your example should work now.
Ciao,
Michael.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel