aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-05-27 20:18:46 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-05-27 20:18:46 -0400
commit88ba3abb4737cf252c7a15588b2f45e6ed37fb83 (patch)
tree9749067427b32ecb932b9e3818e65581bdb266a2
parentmisc/ldd: 'soname => paths' at depth = 1 only (diff)
downloadelfix-88ba3abb4737cf252c7a15588b2f45e6ed37fb83.tar.gz
elfix-88ba3abb4737cf252c7a15588b2f45e6ed37fb83.tar.bz2
elfix-88ba3abb4737cf252c7a15588b2f45e6ed37fb83.zip
misc/ldd: add some comments
-rwxr-xr-xmisc/ldd/ldd.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/ldd/ldd.py b/misc/ldd/ldd.py
index 34d6642..5a15786 100755
--- a/misc/ldd/ldd.py
+++ b/misc/ldd/ldd.py
@@ -77,6 +77,9 @@ def ldpaths(ld_so_conf='/etc/ld.so.conf'):
def dynamic_dt_needed_paths( dt_needed, eclass, paths):
+ """ Search library paths for the library file corresponding
+ to the DT_NEEDED and ELF Class.
+ """
dt_needed_paths = {}
for n in dt_needed:
for p in paths:
@@ -121,6 +124,7 @@ def main():
if len(args) > 1:
sys.stdout.write('%s : \n' % f)
eclass = readelf.elf_class()
+ # This needs to be iterated until we traverse the entire linkage tree
dt_needed = readelf.dynamic_dt_needed()
dt_needed_paths = dynamic_dt_needed_paths( dt_needed, eclass, paths)
for n, lib in dt_needed_paths.items():