weak function symbols

This commit is contained in:
Manuel Simoni
2010-02-27 17:37:59 +01:00
parent d63ec6f20d
commit 95b9a477b6
6 changed files with 32 additions and 3 deletions

11
examples/ex_weak.c Executable file
View File

@ -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();
}
}

6
examples/weak_f.c Normal file
View File

@ -0,0 +1,6 @@
#include <tcclib.h>
void weak_f (void)
{
printf("Weak\n");
}