[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 |
Hi,
I've pushed a small patch that enables weak function symbols:
http://repo.or.cz/w/tinycc.git/commitdiff/95b9a477b6743004e0e9bf728b25bf63d2908777?hp=d63ec6f20dc7e29e266589458ea90fb56f8c86ea
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
Thanks,
Manuel
- [Tinycc-devel] Weak symbols, take 1,
Manuel Simoni <=