patchelf
patchelf copied to clipboard
rename-dynamic-symbols produces unusable binary
Describe the bug
Library produced by renaming dynamic symbol is unusable and cannot be recognized by ldd. nm -a -D shows correct symbols in it.
Steps To Reproduce libcoi_host.so.0.gz gzip -d libcoi_host.so.0.gz echo "COIEventRegisterCallback COIEventRegisterCallback_Disabled" > symbol_map patchelf --output libcoi_host_patched.so --rename-dynamic-symbols symbol_map libcoi_host.so.0 ldd libcoi_host_patched.so not a dynamic executable Expected behavior
I would expect a shared library without COIEventRegisterCallback symbol, with COIEventRegisterCallback_Disabled present (this works) with a library that is recognized by ldd. The input library is recognized by ldd.
patchelf --version output
patchelf 0.18.0
Additional context
Tested on Rocky 8 and Centos 7