haampie / libtree

ldd as a tree
MIT License
2.67k stars 60 forks source link

Cross-platform support #29

Closed ghost closed 2 years ago

ghost commented 4 years ago

Cross-platform support is very useful in a cross-compilation environment. ncopa/lddtree has this feature.

haampie commented 4 years ago

Thanks for opening the issue, do you have an example where libtree doesn't work at the moment? In principle libtree should just parse generic ELF files, but I'm not 100% sure it handles search paths correctly.

haampie commented 4 years ago

Do you mean you want to have an argument to set the filesystem root elsewhere? Is [new root]/etc/ld.so.conf expected to exist when cross-compiling?

I found that you use environment variables to set the search path

https://man7.org/linux/man-pages/man8/ld.so.8.html is followed, so LD_LIBRARY_PATH is considered. Can you tell me a bit more on what you would expect when cross-compiling?

Some shared libraries are located in subdirectories of lib, which you have not considered. For example, libsystemd-shared-246.so located under lib/systemd.

Can you be a bit more precise? What OS are you on? Is this still related to cross-compiling?

haampie commented 4 years ago

Thanks, that makes it a bit easier to test it.