In writing my own compiler, I found this on recent debian versions too
- it seems that glibc requires it as a symbol in each dso now (unless
you link against gcc's crtbegin.o). I haven't looked into it too much,
but for reference, this was mentioned on this mailing list in the past
- https://lists.nongnu.org/archive/html/tinycc-devel/2018-07/msg00000.html

Personally, I made the symbol weak too -
https://github.com/bobrippling/ucc-c-compiler/blob/master/src/rt/dsohandle.c

hth,
Rob


On Sun, 16 Jun 2019 at 16:18, C.J. Wagenius <[email protected]> wrote:
>
> Hi
>
> Trying to compile a program that uses atexit in Fedora 30 (gcc version 9.1.1 
> 20190503, glibc 2.29), results in a tcc error.
> ---
> tcc: error: undefined symbol '__dso_handle'
>
> Regards
> /cjw
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to