Answer the question
In order to leave comments, you need to log in
How to give a process its own libc?
There is a native library for Android that I'm trying to use via JNI on Linux (ubuntu 18.04). There are no specific dependencies there, except for the android libc (bionic).
And at startup, it tries (obviously, unsuccessfully) to use the system libc, although I try to point it to the path where the libraries should be taken from. He finds other libraries there, but libc stubbornly tries to take the system one.
I do something like this:
$ LD_LIBRARY_PATH=libs java -jar someapp.jar
/usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header
Answer the question
In order to leave comments, you need to log in
LD_LIBRARY_PATH=libs LD_PRELOAD=your_custom_libc.so java -jar someapp.jar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question