NixOS / patchelf

A small utility to modify the dynamic linker and RPATH of ELF executables
GNU General Public License v3.0
3.57k stars 487 forks source link

After three times --remove-needed, it will cause "Inconsistency detected by ld.so: dl-version.c: 205: _dl_check_map_versions: Assertion `needed != NULL' failed!" #455

Closed ANaCiSkE closed 1 year ago

ANaCiSkE commented 1 year ago

Describe the bug

After three times --remove-needed, it will cause "Inconsistency detected by ld.so: dl-version.c: 205: _dl_check_map_versions: Assertion `needed != NULL' failed!"

Steps To Reproduce

patchelf --remove-needed liba.so libtarget.so ldd libtarget.so // fine

patchelf --remove-needed libb.so libtarget.so ldd libtarget.so // fine

patchelf --remove-needed libc.so libtarget.so ldd libtarget.so // broken Inconsistency detected by ld.so: dl-version.c: 205: _dl_check_map_versions: Assertion `needed != NULL' failed!

Expected behavior

A clear and concise description of what you expected to happen.

patchelf --version output patchelf 0.17.2

Additional context

Add any other context about the problem here.

ANaCiSkE commented 1 year ago

It maybe cannot be reproduced in every libarary. Please feel free to close this issue if you think that's rare cases.

Mic92 commented 1 year ago

I don't think we are using this flag a lot in the nixpkgs. It's more often used by people dealing with proprietary legacy software, so I assume it still has a few edge cases...

ANaCiSkE commented 1 year ago

thanks a lot