[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Weak symbols, take 1

From: Manuel Simoni
Subject: [Tinycc-devel] Weak symbols, take 1
Date: Sat, 27 Feb 2010 17:44:56 +0100


I've pushed a small patch that enables weak function symbols:


As an example, examples/ex_weak.c uses a function declared as weak
(from examples/weak_f.c).
Before this patch, compiling ex_weak.c without weak_f.c before it
results in an undefined symbol error.
With this patch, it works as expected.

However, it doesn't work for variables, only functions. Any pointers?

Furthermore it crashes the test suite:

address@hidden:~/src/tinycc$ make test
make -C tests test
make[1]: Entering directory `/home/ms/src/tinycc/tests'
------------ libtest ------------
./libtcc_test lib_path=..
Hello World!
fib(32) = 2178309
add(32, 64) = 96
------------ test3 ------------
../tcc -B.. -DTCC_TARGET_I386 -run ../tcc.c -B.. -DTCC_TARGET_I386
-run ../tcc.c -B.. -DTCC_TARGET_I386 -run ../tcc.c -B.. -run tcctest.c
> test.out3
Segmentation fault
make[1]: *** [test3] Error 139
make[1]: Leaving directory `/home/ms/src/tinycc/tests'
make: *** [test] Error 2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]