18 lines
422 B
C
18 lines
422 B
C
|
// declare base_func; no mark -> load-time imported symbol
|
||
|
void base_func(void);
|
||
|
|
||
|
// declare base_func; mark it as an exported symbol
|
||
|
__attribute__ ((visibility ("default"))) void plugin_func(void);
|
||
|
|
||
|
// define plugin_func
|
||
|
#include <stdio.h>
|
||
|
__attribute__ ((visibility ("default"))) void
|
||
|
plugin_func(void){
|
||
|
printf("provided by plugin: {\n");
|
||
|
printf(" ");
|
||
|
base_func();
|
||
|
printf(" ");
|
||
|
base_func();
|
||
|
printf("}\n");
|
||
|
}
|