Limiting visibility of symbols when linking shared libraries
GNU ld can do that on ELF platforms. Here is how to do it with a linker version script: /* foo.c */ int foo() { return 42; } int bar() { return foo() + 1; } int baz() { return bar() – 1; } gcc -fPIC -shared -o libfoo.so foo.c && nm -D libfoo.so | … Read more