From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 534711381F3 for ; Mon, 24 Dec 2012 11:00:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9107C21C085; Mon, 24 Dec 2012 10:59:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D2B0C21C080 for ; Mon, 24 Dec 2012 10:59:08 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BFBB633D9BA for ; Mon, 24 Dec 2012 10:59:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 66254E544B for ; Mon, 24 Dec 2012 10:59:06 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1356346677.510569e82e9c0cbd875f8ddbe114c5bf0c1bb1f8.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:elfix-0.7.x commit in: misc/ X-VCS-Repository: proj/elfix X-VCS-Files: misc/alt-revdep-pax X-VCS-Directories: misc/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 510569e82e9c0cbd875f8ddbe114c5bf0c1bb1f8 X-VCS-Branch: elfix-0.7.x Date: Mon, 24 Dec 2012 10:59:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6a8c657d-df77-4305-b168-91a7576695c1 X-Archives-Hash: b13ec8fd0126e0e9301f211f38a7c7ea commit: 510569e82e9c0cbd875f8ddbe114c5bf0c1bb1f8 Author: Anthony G. Basile gentoo org> AuthorDate: Sat Dec 22 04:21:43 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Dec 24 10:57:57 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=510569e8 misc/alt-revdep-pax: remove copy.copy in constructing object linking chain --- misc/alt-revdep-pax | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/misc/alt-revdep-pax b/misc/alt-revdep-pax index fcf63b6..181b57e 100755 --- a/misc/alt-revdep-pax +++ b/misc/alt-revdep-pax @@ -13,7 +13,7 @@ import os import sys import re import pax -from copy import copy +#from copy import copy def get_object_needed(): """ @@ -98,23 +98,27 @@ def get_soname_needed( object_needed, library2soname ): for elf in object_needed: try: soname = library2soname[elf] - soname_needed[soname] = copy(object_needed[elf]) #copy the list + soname_needed[soname] = object_needed[elf] + #soname_needed[soname] = copy(object_needed[elf]) #copy the list except KeyError: continue # no soname, its probably an executable return soname_needed -def get_soname_linkings( soname_needed ): +def get_soname_linkings( soname_needed, soname2library ): soname_linkings = {} for soname in soname_needed: - needed = copy(soname_needed[soname]) + needed = soname_needed[soname] + #needed = copy(soname_needed[soname]) #copy the list while True: count = 0 for s in needed: try: for sf in soname_needed[s]: - if not sf in needed: + if not sf in needed and sf in soname2library: + # This appends to the object_needed and + # soname_needed list. No copy was done needed.append(sf) count = 1 except KeyError: @@ -139,10 +143,11 @@ def main(): object_needed = get_object_needed() ( library2soname, soname2library ) = get_library() soname_needed = get_soname_needed( object_needed, library2soname ) - soname_linkings = get_soname_linkings( soname_needed ) - print soname_linkings + soname_linkings = get_soname_linkings( soname_needed, soname2library ) - #forward_linkings = get_forward_linkings( object_needed, soname_linkings ) + # After the appending in get_soname_linkings, forward_needed has + # been extended through the entire chain of linking.:w + object_linkings = object_needed """ Print out all ELF objects and their PaX flags @@ -162,10 +167,10 @@ def main(): for soname in sorted(soname2library): elf = soname2library[soname] print("%s : %s" % ( soname, elf )) + """ - """ - """ Print out all ELF objects and the NEEDED sonames and full library paths + """ Print out all ELF objects and the NEEDED sonames and full library paths """ for elf in object_needed: sonames = object_needed[elf] print("%s" % elf) @@ -175,7 +180,6 @@ def main(): except KeyError: print("\t%s\t=> ****" % soname) print("\n\n") - """ """ Print out all the soname to soname NEEDED for soname in soname_needed: