1 |
commit: 88ba3abb4737cf252c7a15588b2f45e6ed37fb83 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 28 00:18:46 2014 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 28 00:18:46 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=88ba3abb |
7 |
|
8 |
misc/ldd: add some comments |
9 |
|
10 |
--- |
11 |
misc/ldd/ldd.py | 4 ++++ |
12 |
1 file changed, 4 insertions(+) |
13 |
|
14 |
diff --git a/misc/ldd/ldd.py b/misc/ldd/ldd.py |
15 |
index 34d6642..5a15786 100755 |
16 |
--- a/misc/ldd/ldd.py |
17 |
+++ b/misc/ldd/ldd.py |
18 |
@@ -77,6 +77,9 @@ def ldpaths(ld_so_conf='/etc/ld.so.conf'): |
19 |
|
20 |
|
21 |
def dynamic_dt_needed_paths( dt_needed, eclass, paths): |
22 |
+ """ Search library paths for the library file corresponding |
23 |
+ to the DT_NEEDED and ELF Class. |
24 |
+ """ |
25 |
dt_needed_paths = {} |
26 |
for n in dt_needed: |
27 |
for p in paths: |
28 |
@@ -121,6 +124,7 @@ def main(): |
29 |
if len(args) > 1: |
30 |
sys.stdout.write('%s : \n' % f) |
31 |
eclass = readelf.elf_class() |
32 |
+ # This needs to be iterated until we traverse the entire linkage tree |
33 |
dt_needed = readelf.dynamic_dt_needed() |
34 |
dt_needed_paths = dynamic_dt_needed_paths( dt_needed, eclass, paths) |
35 |
for n, lib in dt_needed_paths.items(): |