https://sourceware.org/bugzilla/show_bug.cgi?id=23268
--- Comment #1 from Mike Hommey <mh-sourceware at glandium dot org> --- As for what kind of subtle problem this can cause: $ cat foo.c #include <stdlib.h> void* malloc_hook(size_t s) { abort(); } void* (*__malloc_hook)(size_t s) = malloc_hook; int main() { malloc(1);} $ cat ver hidden { local: main; }; $ gcc -o foo foo.c -rdynamic -Wl,--version-script,ver # Aborted means we got in the hook. $ ./foo Aborted $ gcc -o foo foo.c -rdynamic -Wl,--version-script,ver -fuse-ld=gold $ ./foo No output in this case, because the hook is not found by ld.so: $ LD_DEBUG=bindings ./foo 2>&1 | grep malloc_hook 1531: binding file /lib/x86_64-linux-gnu/libc.so.6 [0] to /lib/x86_64-linux-gnu/libc.so.6 [0]: normal symbol `__malloc_hook' [GLIBC_2.2.5] The reason being that since __malloc_hook has a symbol version (that thanks to bug 23267, neither objdump nor readelf show), ld.so doesn't pick it up because the symbol version doesn't match GLIBC_2.2.5. (Yes, the version script is a little contrived, for $reasons ; but this would happen with a version script that exports other symbols with a symbol version too) -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils