[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Fedora 30 and atexit results in error
From: |
C.J. Wagenius |
Subject: |
Re: [Tinycc-devel] Fedora 30 and atexit results in error |
Date: |
Sat, 22 Jun 2019 06:09:46 +0200 (CEST) |
22 juni 2019 01:43 av address@hidden:
> 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.
>
It compiles ok now, but the binary is complaining.
$ ./tcc ~/Temp/atexit.c -o atexit
$ ./atexit
./atexit: symbol lookup error: ./atexit: undefined symbol: __dso_handle
Thamks for looking into this.
/cjw