You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Removing too many or wrong symbols from a binary's .dynsym table #369
I have a binary I am packaging with appimage. Before it is packaged with appimage I run "readelf -a" on it and in the ".dynsym" table has 5299 entries. However after it is processed by the appimage builder the .dynsym table only has 1030 entries and is missing at least one symbol in that table that I need and causes an "undefined symbol" upon running the appimage. There is shared object library that is linked to the binary that needs to call that symbol which is statically linked into the binary. The binary runs ok without appimage builder.
It is related to lief 0.12.2 upgrading to 0.16.4 maintains the symbols that were previously removed but still somehow causes an undefined symbol as described above. It looks like the only usage of lief is to get some information and change the interpreter. Instead of using lief's binary.write(...) method, using patchelf to change the interpreter fixes it since patchelf seems to write out the file more reliably than lief.
Activity
Osurac529 commentedon Mar 4, 2025
It is related to lief 0.12.2 upgrading to 0.16.4 maintains the symbols that were previously removed but still somehow causes an undefined symbol as described above. It looks like the only usage of lief is to get some information and change the interpreter. Instead of using lief's
binary.write(...)method, usingpatchelfto change the interpreter fixes it sincepatchelfseems to write out the file more reliably than lief.