aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-12-22 23:53:37 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-12-24 05:57:57 -0500
commit6689178d4f48b9f1f68902a81c13ff3f57d3cde4 (patch)
treea2c30745a10b120b5edf517d863f69b99218ef66
parent misc/alt-revdep-pax: add print forward linkings per elf object (-b) (diff)
downloadelfix-6689178d4f48b9f1f68902a81c13ff3f57d3cde4.tar.gz
elfix-6689178d4f48b9f1f68902a81c13ff3f57d3cde4.tar.bz2
elfix-6689178d4f48b9f1f68902a81c13ff3f57d3cde4.zip
misc/alt-revdep-pax: correct expand_linkings() to include first ELF object in linkage chain
-rwxr-xr-xmisc/alt-revdep-pax18
1 files changed, 9 insertions, 9 deletions
diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax
index 4ea90d4..d5770e4 100755
--- a/misc/alt-revdep-pax
+++ b/misc/alt-revdep-pax
@@ -134,19 +134,19 @@ def get_soname_needed( object_needed, library2soname ):
return soname_needed
"""
-Run through the entire chain of sonameX -> sonameY ... -> sonameZ chain.
-We do this by continuously expanding the list pointed to by the dictionary
+Run through the entire chain of obj -> sonameX -> sonameY ... -> sonameZ chain.
+We do this by continuously expanding the list value of the dictionary key elf
entry until there are no new soname's found.
"""
-def get_soname_linkings( soname_needed, soname2library ):
+def expand_linkings( object_needed, soname2library ):
- for soname in soname_needed:
+ for elf in object_needed:
while True:
found_new_soname = False
- for s in soname_needed[soname]: # For all the next links ...
+ for s in object_needed[elf]: # For all the next links ...
try:
- for sf in soname_needed[s]: # ... go one step ahead in the chain
- if sf in soname_needed[soname]: # ... skip it if we already included it
+ for sf in object_needed[soname2library[s]]: # ... go one step ahead in the chain
+ if sf in object_needed[elf]: # ... skip it if we already included it
continue
if not sf in soname2library: # ... skip if its a vdso
continue
@@ -155,7 +155,7 @@ def get_soname_linkings( soname_needed, soname2library ):
# was done so its the same lists in
# memory for both, and its modified
# for both.
- soname_needed[soname].append(sf) # ... otherwise collapse it back into
+ object_needed[elf].append(sf) # ... otherwise collapse it back into
found_new_soname = True # first node of the chain.
except KeyError: # Not all nodes in the chain have a next node
@@ -172,7 +172,7 @@ def get_object_linkings():
object_needed = get_object_needed()
( library2soname, soname2library ) = get_libraries()
soname_needed = get_soname_needed( object_needed, library2soname )
- get_soname_linkings( soname_needed, soname2library )
+ expand_linkings( object_needed, soname2library )
return ( object_needed, soname2library )