--- a/src/mklibs +++ b/src/mklibs @@ -463,7 +463,7 @@ while 1: passnr = passnr + 1 # Gather all already reduced libraries and treat them as objects as well small_libs = [] - for lib in regexpfilter(os.listdir(dest_path), "(.*-so-stripped)$"): + for lib in regexpfilter(os.listdir(dest_path), "(.*-so)$"): obj = dest_path + "/" + lib small_libs.append(obj) inode = os.stat(obj)[ST_INO] @@ -579,12 +579,7 @@ while 1: if not so_file: sys.exit("File not found:" + library) pic_file = find_pic(library) - if not pic_file: - # No pic file, so we have to use the .so file, no reduction - debug(DEBUG_VERBOSE, "No pic file found for", so_file, "; copying") - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - so_file, dest_path + "/" + so_file_name + "-so-stripped") - else: + if pic_file: # we have a pic file, recompile debug(DEBUG_SPAM, "extracting from:", pic_file, "so_file:", so_file) soname = extract_soname(so_file) @@ -627,22 +622,14 @@ while 1: cmd.append(library_depends_gcc_libnames(so_file)) command(target + "gcc", *cmd) - # strip result - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - dest_path + "/" + so_file_name + "-so", - dest_path + "/" + so_file_name + "-so-stripped") ## DEBUG debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`) debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t", `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`) - debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so-stripped", - "\t", `os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]`) # Finalising libs and cleaning up -for lib in regexpfilter(os.listdir(dest_path), "(.*)-so-stripped$"): - os.rename(dest_path + "/" + lib + "-so-stripped", dest_path + "/" + lib) -for lib in regexpfilter(os.listdir(dest_path), "(.*-so)$"): - os.remove(dest_path + "/" + lib) +for lib in regexpfilter(os.listdir(dest_path), "(.*)-so$"): + os.rename(dest_path + "/" + lib + "-so", dest_path + "/" + lib) # Canonicalize library names. for lib in regexpfilter(os.listdir(dest_path), "(.*so[.\d]*)$"): value='grep'>log msg
path: root/docs/config.tex
blob: 08318b4b6cfb2468354a6e8f592bef9c1287137b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101