LIEF icon indicating copy to clipboard operation
LIEF copied to clipboard

Removing library libc.so makes ELF invalid

Open JJTech0130 opened this issue 1 year ago • 1 comments

Describe the bug Removing libc.so from the libraries list will cause the ELF to become invalid.

Using ldd on it produces the following output:

Inconsistency detected by ld.so: dl-version.c: 205: _dl_check_map_versions: Assertion `needed != NULL' failed!

To Reproduce Steps to reproduce the behavior:

binary.remove_library("libc.so")
binary.add_library("libc.so.6")

and then try to link against it (or even just use ldd)

Expected behavior I want to remove libc.so and replace it with libc.so.6, as that's what it's called on my platform.

Environment (please complete the following information):

  • System and Version: Linux raspberrypi 5.10.63-v8+ #1459 SMP PREEMPT Wed Oct 6 16:42:49 BST 2021 aarch64 GNU/Linux
  • Target format (PE, ELF, Mach-O): ELF
  • LIEF commit version: 0.12.1-c7b3ce3b

Additional context I'm modifying the attached libstoreservicescore.so.zip file.

JJTech0130 avatar Aug 19 '22 21:08 JJTech0130

Hello @JJTech0130, Could you add the version of ldd you are using?

Thank you

romainthomas avatar Sep 06 '22 03:09 romainthomas