From 0f0c2d9c02d357c247f7310908124c39b8625d35 Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Mon, 7 Mar 2011 00:25:27 -0800 Subject: weak redefinition of a symbol should weaken the original --- tests/tcctest.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/tcctest.c b/tests/tcctest.c index bd1b975..fc2b9ed 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2370,6 +2370,10 @@ extern __typeof(dummy) weak_dummy1 __attribute__((weak, alias("dummy"))); extern __typeof(dummy) __attribute__((weak, alias("dummy"))) weak_dummy2; extern __attribute__((weak, alias("dummy"))) __typeof(dummy) weak_dummy3; +int some_lib_func(void); +int dummy_impl_of_slf(void) { return 444; } +int some_lib_func(void) __attribute__((weak, alias("dummy_impl_of_slf"))); + void __attribute__((weak)) weak_test(void) { printf("weak_f1=%d\n", weak_f1 ? weak_f1() : 123); -- cgit v1.3.1