Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename-dynamic-symbols produces unusable binary #540

Open
J-cztery opened this issue Dec 15, 2023 · 0 comments
Open

rename-dynamic-symbols produces unusable binary #540

J-cztery opened this issue Dec 15, 2023 · 0 comments
Labels

Comments

@J-cztery
Copy link

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

@J-cztery J-cztery added the bug label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant