binutils/tests/Regression/bz895241-Bogus-warning-about-cross-object-references-to/t.c

17 lines
342 B
C
Raw Normal View History

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