> should be automatically linked
Maybe "semi-automatically"... ;)
clive@akira:~/temp$ tinycc/tcc -v
tcc version 0.9.27 - b5d4b90 (x86_64 Linux)
clive@akira:~/temp$ cat b.c
int b(int x)
{
float y = x;
-y; /* generates the reference to __mzerosf */
return y;
}
clive@akira:~/temp$ tinycc/tcc -c b.c
clive@akira:~/temp$ nm b.o
0000000000000000 T b
U __mzerosf
clive@akira:~/temp$ gcc -shared -o b.so b.o
clive@akira:~/temp$ ./a
./b.so: undefined symbol: __mzerosf
But I also got the OP's error with tcc:
clive@akira:~/temp$ tinycc/tcc -shared -o b.so b.c
clive@akira:~/temp$ ./a
./b.so: undefined symbol: __mzerosf
On 6/25/21 6:11 PM, Elijah Stone wrote:
On Fri, 25 Jun 2021, LOPEZ OLIVIER wrote:
I actually got an error when I dlopen the library compiled by tcc (no
error when I compil it with gcc).
The error is : “undefined symbol: __mzerosf”
__mzerosf is part of the tcc runtime library, which should be
automatically linked in with everything. If you linked with gcc or l,
though, it wouldn't know to do that so the symbol wouldn't be
resolved. Make sure you're linking with tcc.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel