Would ldd do what you want?
EDIT: Had more time to look, and found out this would not work, at least for my distro. Using ldd
may not work depending on how Firefox was compiled -- it works only if the library you are interested in is dynamically linked.
For me, if I run command -v firefox
, I get /usr/bin/firefox
. Running ldd /usr/bin/firefox
results in an error: not a dynamic executable
. It turns out that, for me, /usr/bin/firefox
is just a small script that calls /usr/lib/firefox/firefox
. Running ldd
on that file produces the following:
linux-vdso.so.1 (0x00007ffe4e2e7000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f75eb400000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f75eb318000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f75eb6ae000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f75eb131000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f75eb7ba000)
None of these look like a library of interest to you, so the library you want must have been statically linked.
(As a side note, don't use ldd
on an untrusted executable b/c it may run the executable to get the information.)
In that case, if you really want to dig, you can try something like readelf
to dump info about the executable. If you know what you're looking for (such as GTK), you might be able to grep for it. However, my version of Firefox has the symbol table stripped, so I don't think there's much else I can do.
And of course, if you have open-source software, you can always just go check the source code :)