diff options
| author | Manuel Simoni <msimoni@gmail.com> | 2010-02-27 17:37:59 +0100 |
|---|---|---|
| committer | Manuel Simoni <msimoni@gmail.com> | 2010-02-27 17:37:59 +0100 |
| commit | 95b9a477b6743004e0e9bf728b25bf63d2908777 (patch) | |
| tree | d5406d5ac0054dda4ddb5494ae58103f3d5c0930 /examples | |
| parent | d63ec6f20dc7e29e266589458ea90fb56f8c86ea (diff) | |
| download | tinycc-95b9a477b6743004e0e9bf728b25bf63d2908777.tar.gz tinycc-95b9a477b6743004e0e9bf728b25bf63d2908777.tar.bz2 | |
weak function symbols
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/ex_weak.c | 11 | ||||
| -rw-r--r-- | examples/weak_f.c | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/examples/ex_weak.c b/examples/ex_weak.c new file mode 100755 index 0000000..2a2bd19 --- /dev/null +++ b/examples/ex_weak.c @@ -0,0 +1,11 @@ +#! /usr/local/bin/tcc -run +#include <tcclib.h> + +extern void weak_f (void) __attribute__ ((weak)); + +int main () +{ + if (weak_f) { + weak_f(); + } +} diff --git a/examples/weak_f.c b/examples/weak_f.c new file mode 100644 index 0000000..e744531 --- /dev/null +++ b/examples/weak_f.c @@ -0,0 +1,6 @@ +#include <tcclib.h> + +void weak_f (void) +{ + printf("Weak\n"); +} |
