Hook symbols not found in libc_malloc_debug.so
Josh Leivenzon
hacker1024@users.sourceforge.net
Sun Sep 8 04:17:29 GMT 2024
Hi all,
I am trying to use some proprietary software meant for use with glibc 2.31 on 2.39 instead.
This software fails at runtime due to the following missing symbols: ErrorF, __malloc_hook, __realloc_hook, __free_hook, and __memalign_hook.
I'm not too sure about ErrorF, but as for the latter symbols, I believe that preloading libc_malloc_debug.so is supposed to make them available. This, for some reason, is not working.
Using LD_DEBUG=symbols, I can see that libc_malloc_debug.so is being searched, but the symbols are not found there. I get the following lines among similar ones for other loaded libraries (I'm using Nix, hence the long paths, but I don't think that should be a problem):
...
symbol=__malloc_hook; lookup in file=/nix/store/5qfsgr600bry4a6431w311jv4a73v8js-glibc-2.39-52/lib/libc_malloc_debug.so [0]
...
error: symbol lookup error: undefined symbol: __malloc_hook (fatal)
...
symbol=__realloc_hook; lookup in file=/nix/store/5qfsgr600bry4a6431w311jv4a73v8js-glibc-2.39-52/lib/libc_malloc_debug.so [0]
...
error: symbol lookup error: undefined symbol: __realloc_hook (fatal)
...
symbol=__free_hook; lookup in file=/nix/store/5qfsgr600bry4a6431w311jv4a73v8js-glibc-2.39-52/lib/libc_malloc_debug.so [0]
...
error: symbol lookup error: undefined symbol: __free_hook (fatal)
...
symbol=__memalign_hook; lookup in file=/nix/store/5qfsgr600bry4a6431w311jv4a73v8js-glibc-2.39-52/lib/libc_malloc_debug.so [0]
...
error: symbol lookup error: undefined symbol: __memalign_hook (fatal)
Using nm, I can see the following symbols in libc_malloc_debug.so:
__malloc_hook@GLIBC_2.17
__realloc_hook@GLIBC_2.17
__free_hook@GLIBC_2.17
__memalign_hook@GLIBC_2.17
What's going wrong here? Why can't these symbols be found at runtime?
Thanks,
Josh
More information about the Libc-help
mailing list