Closed speidy closed 4 years ago
@speidy Could you post the environment information you tested on? I failed to set up a uClibc environment to check your pull request.
I have a question.
Why features.h
is included? It is a linux-specific header. It prevent compiling on other platforms.
Hi @kubo,
#include <features.h>
- its redundant. Iv'e omitted this include now.make CC=x86_64-buildroot-linux-uclibc-gcc
2.4. Now, change directory to the toolchain' sysroot directory, e.g.: ~/toolchains/x86-64-core-i7--uclibc--stable-2018.11-1/x86_64-buildroot-linux-uclibc/sysroot
2.5. Now copy testprog
to <sysroot>/usr/bin
and libtest.so
to <sysroot>/usr/lib
.
2.6. Now you also need to mount the procfs (as plthook using it): sudo mount -t proc none <sysroot>/proc
2.6. now run the test binary under the chrooted sysroot: sudo chroot . ./usr/bin/testprog
(run from sysroot directory)Let me know if that works for you.
Thanks. I verified your code. Merged.
Tests for uclibc support was added. https://github.com/kubo/plthook/commit/0a4c2a1d0e69cebe567dbae38d016299c4dd9a64
Thanks @kubo !
uClibc doesn't implement the dlinfo() and dladdr1() dl functions. The existing Android solution fits for the uClibc case as well.
I’ve ran the test program locally when compiling with uClibc toolchain grabbed from: https://toolchains.bootlin.com.
I'll be happy if you can add the uClibc toolchain to the Travis CI system as well.