0

Suppose I have a dynamically-linked executable which depends on symbols in libfoo and libbar; and that it works on my system, i.e. it finds appropriate versions of these shared libraries. Now, I want to "replace" the dynamic dependencies on libfoo with compiled code from the libfoo I have on my system, obtaining a new executable which only dynamically depends on libbar.

Is this possible? At least, on a modern(ish) Linux system?

If it helps, you may assume additionally that the executable results from a single C source file; that I have this file; that I compiled with/without debug info or with whatever compilation switch you like.

1 Answer 1

1

Is this possible?

No. Modifying linked a.out or libfoo.so is impossible for all practical purposes.

You might have some luck with the statifier, but that doesn't always work and creates huge binaries.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.