Skip to content

Instantly share code, notes, and snippets.

@velzie
Last active February 20, 2024 19:07
Show Gist options
  • Save velzie/85296ae8ccebd7a1c9a614c4647a36bd to your computer and use it in GitHub Desktop.
Save velzie/85296ae8ccebd7a1c9a614c4647a36bd to your computer and use it in GitHub Desktop.
convert compiled binary into static binary
mkdir libs
cp $(ldd bin | sed -e "s/ (.*//" -e "s/\t//g" -e "s/.*=> //" | grep -v "linux-vdso.so.1") libs
# to execute the program, libs/linker.so --library-path libs /path/to/binary
# ty r58 for the fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment