weak function symbols
This commit is contained in:
11
examples/ex_weak.c
Executable file
11
examples/ex_weak.c
Executable 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
6
examples/weak_f.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <tcclib.h>
|
||||
|
||||
void weak_f (void)
|
||||
{
|
||||
printf("Weak\n");
|
||||
}
|
||||
Reference in New Issue
Block a user