binutils/tests/Regression/bz895241-Bogus-warning-about-cross-object-references-to/t.c
2021-04-28 13:38:57 +02:00

17 lines
342 B
C

#include <stdio.h>
#include <dlfcn.h>
void foo(void) __attribute__((visibility("hidden")));
void foo(void) {
puts("In executable: foo - before forwarding to DSO");
((void(*)(void))dlsym(RTLD_DEFAULT,"foo"))();
puts("In executable: foo - after forwarding to DSO");
}
void bar(void);
int main() {
foo();
bar();
}