Question: Is there a way to get the list of all dynamic libraries needed by a given elf through API?

Yuri yuri at rawbw.com
Tue Jul 2 05:27:30 UTC 2019


On 2019-07-01 20:15, Shawn Webb wrote:
> $ ldd -f '%p\n' /bin/ls


Hi Shawn,


ldd doesn't do what I need. It sets one specific environment variable, 
then forks and calls execl(3).

And I am looking for the API function like: char* 
find_shared_library_mapping(const char *so_lib, char *buf_out, size_t 
buf_out_sz); // or something like this.


Yuri




More information about the freebsd-hackers mailing list