caleb joined:
2007-09-22 posted:
630 promoted: 134 bookmarked: 90
| 1 | subject:
如何把多餘的 linked libraries 幹掉? |
0
0 | 2007-11-20 | quote | | |
最新版的 dpkg 吐了下面這一大堆 warning messages。
很多是我本來就知道的,不過眼不見為淨…
現在既然有詳細 message 列表,就順便問一下…
怎樣把這些用不到的 linked lib 拿掉?
以 gcin-gb-toggle 為例,根本只用到 gdk 沒用到 gtk,去掉多餘 link 檔案可以大幅縮減。
gcin-setup-tab shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin-setup-tab shouldn't be linked with libm.so.6 (it uses none of its symbols).
gcin-setup-tab shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin-setup-tab shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gcin-setup-tab shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin-setup-tab shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin-setup-tab shouldn't be linked with libdl.so.2 (it uses none of its symbols).
phoa2d shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libm.so.6 (it uses none of its symbols).
phoa2d shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
phoa2d shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
phoa2d shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin shouldn't be linked with libdl.so.2 (it uses none of its symbols).
phod2a shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libm.so.6 (it uses none of its symbols).
phod2a shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
phod2a shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
phod2a shouldn't be linked with libdl.so.2 (it uses none of its symbols).
sim2trad shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
sim2trad shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
sim2trad shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
sim2trad shouldn't be linked with libm.so.6 (it uses none of its symbols).
sim2trad shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
sim2trad shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
sim2trad shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
sim2trad shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
sim2trad shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-message shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libm.so.6 (it uses none of its symbols).
gcin-message shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin-message shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin-message shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-message shouldn't be linked with libglib-2.0.so.0 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libm.so.6 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
im-gcin.so shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libm.so.6 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-gb-toggle shouldn't be linked with libglib-2.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libm.so.6 (it uses none of its symbols).
gtab-merge shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gtab-merge shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gtab-merge shouldn't be linked with libdl.so.2 (it uses none of its symbols).
juyin-learn shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
juyin-learn shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
juyin-learn shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
juyin-learn shouldn't be linked with libm.so.6 (it uses none of its symbols).
juyin-learn shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
juyin-learn shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
juyin-learn shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
juyin-learn shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
juyin-learn shouldn't be linked with libdl.so.2 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libm.so.6 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
tsa2d32 shouldn't be linked with libdl.so.2 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libm.so.6 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
tsd2a32 shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin2tab shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libm.so.6 (it uses none of its symbols).
gcin2tab shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin2tab shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin2tab shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libm.so.6 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-tan-toggle shouldn't be linked with libglib-2.0.so.0 (it uses none of its symbols).
tslearn shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
tslearn shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
tslearn shouldn't be linked with libm.so.6 (it uses none of its symbols).
tslearn shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
tslearn shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
tslearn shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
tslearn shouldn't be linked with libdl.so.2 (it uses none of its symbols).
tsd2a shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libm.so.6 (it uses none of its symbols).
tsd2a shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
tsd2a shouldn't be linked with libgobject-2.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
tsd2a shouldn't be linked with libdl.so.2 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libm.so.6 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libpango-1.0.so.0 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its symbols).
gcin-setup-old shouldn't be linked with libdl.so.2 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libmng.so.1 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libjpeg.so.62 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libpng12.so.0 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libz.so.1 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libXrender.so.1 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libXrandr.so.2 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libXft.so.2 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libfontconfig.so.1 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libXext.so.6 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libSM.so.6 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libICE.so.6 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libdl.so.2 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libpthread.so.0 (it uses none of its symbols).
libqgcin.so shouldn't be linked with libm.so.6 (it uses none of its symbols).
|
本人已不在此站活動
joined:
2007-09-19 posted:
4946 promoted: 325 bookmarked: 206 歸隱山林 |
這個我也有點好奇,用 pkg-config 的本來就會這樣?
分開寫?不要通通都直接用 gtk+-2.0?
|
eliu
joined:
2007-08-09 posted:
11474 promoted: 617 bookmarked: 187 新竹, 台灣 |
gcin-setup-tab shouldn't be linked with libpango |
GTK 不是都用 pango 去 draw string,怎麼可能沒有用到。
|
本人已不在此站活動
joined:
2007-09-19 posted:
4946 promoted: 325 bookmarked: 206 歸隱山林 | 4 | subject:
如何把多餘的 linked libraries 幹掉? |
0
0 | 2007-11-20 | quote | | |
caleb |
以 gcin-gb-toggle 為例,根本只用到 gdk 沒用到 gtk,去掉多餘 link 檔案可以大幅縮減。
|
[edt1023@lgj ~]$ pkg-config --libs gdk-2.0
-Wl,--rpath -Wl,/usr/local/lib -pthread -L/usr/local/lib -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -liconv -lX11 -lXfixes
跑不掉!
ps.我現在在 fbsd 下,所以會有 -liconv。
|
caleb joined:
2007-09-22 posted:
630 promoted: 134 bookmarked: 90
|
修正 LDFLAGS 後,使用上完全沒問題,不過檔案沒變小多少(全都有變小就是了)
看來不管那些 warning messages 是比較划算的,沒必要為了小一點點而大改 configure / Makefile
底下是修改 LDFLAGS 前後的 stripped binary 大小變化
gcin 169268 -> 169236
gcin-gb-toggle 7720 -> 7440
gcin-message 8272 -> 7992
gcin-setup 60392 -> 60232
gcin-setup-tab 55776 -> 55744
gcin2tab 14028 -> 13940
gtab-merge 11120 -> 10840
juyin-learn 18856 -> 18632
phoa2d 10168 -> 9936
phod2a 14312 -> 14184
sim2trad 10004 -> 9116
tsa2d32 13100 -> 12868
tsd2a 7676 -> 7396
tsd2a32 7676 -> 7396
tslearn 31140 -> 31076
im-gcin.so 10108 -> 10052
libqgcin.so 28892 -> 28596
|
eliu
joined:
2007-08-09 posted:
11474 promoted: 617 bookmarked: 187 新竹, 台灣 |
哇,您還真有毅力。
|
savage joined:
2007-09-28 posted:
60 promoted: 2 bookmarked: 1 火星 |
我記得(印象中),沒用到的 link 也不會真的去 link,所以對可執行檔大小及執行速度的影響很小。
而且,ldd 是 recursively 列出 DSO,有些並不是直接用到的。
|