3 @@ -440,7 +440,7 @@ while 1:
5 # Gather all already reduced libraries and treat them as objects as well
7 - for lib in regexpfilter(os.listdir(dest_path), "(.*-so-stripped)$"):
8 + for lib in regexpfilter(os.listdir(dest_path), "(.*-so)$"):
9 obj = dest_path + "/" + lib
10 small_libs.append(obj)
11 inode = os.stat(obj)[ST_INO]
12 @@ -552,12 +552,7 @@ while 1:
14 sys.exit("File not found:" + library)
15 pic_file = find_pic(library)
17 - # No pic file, so we have to use the .so file, no reduction
18 - debug(DEBUG_VERBOSE, "No pic file found for", so_file, "; copying")
19 - command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
20 - so_file, dest_path + "/" + so_file_name + "-so-stripped")
23 # we have a pic file, recompile
24 debug(DEBUG_SPAM, "extracting from:", pic_file, "so_file:", so_file)
25 soname = extract_soname(so_file)
26 @@ -600,22 +595,14 @@ while 1:
27 cmd.append(library_depends_gcc_libnames(so_file))
28 command(target + "gcc", *cmd)
31 - command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
32 - dest_path + "/" + so_file_name + "-so",
33 - dest_path + "/" + so_file_name + "-so-stripped")
35 debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`)
36 debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t",
37 `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`)
38 - debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so-stripped",
39 - "\t", `os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]`)
41 # Finalising libs and cleaning up
42 -for lib in regexpfilter(os.listdir(dest_path), "(.*)-so-stripped$"):
43 - os.rename(dest_path + "/" + lib + "-so-stripped", dest_path + "/" + lib)
44 -for lib in regexpfilter(os.listdir(dest_path), "(.*-so)$"):
45 - os.remove(dest_path + "/" + lib)
46 +for lib in regexpfilter(os.listdir(dest_path), "(.*)-so$"):
47 + os.rename(dest_path + "/" + lib + "-so", dest_path + "/" + lib)
49 # Canonicalize library names.
50 for lib in regexpfilter(os.listdir(dest_path), "(.*so[.\d]*)$"):