Summary: | [Qt] Dead-code stripping for unix | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Laszlo Gombos <laszlo.gombos> | ||||||||
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | hausmann | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
Attachments: |
|
Description
Laszlo Gombos
2009-05-24 13:08:07 PDT
Created attachment 30633 [details]
Turn on GCC dead-code stripping flags for Unix
(In reply to comment #0) > Turn on dead-code stripping for the Qt port - Unix (no Mac) and GCC only. > In default configuration, this change reduced the binary size by ~6% (with 1.23 > Mb); removed ~3900 dead symbols (statistics based on r44115) Cross the dead symbol statistics, it should be less than the number I gave.. Do you have a list of dead symbols? Created attachment 30654 [details]
List of dead symbols - Qt port on Linux
~ 3400 dead symbols; my initial numbers were not far off; Interesting list to scan trough.
Comment on attachment 30633 [details]
Turn on GCC dead-code stripping flags for Unix
I'm a bit sad. I had the hope that the linker would remove these symbols... the other sad part is linking time will be slighly increased now?
On the top of the list of the dead symbols is _NPN_IntFromIdentifier, which is used right in PluginPackage.cpp (the address of the symbol is taken, so it can't be inlined). How did you generate the list? Was it generated on a build without netscape plugin support? Created attachment 31411 [details] Regenerated dead symbol list for r44682 (In reply to comment #7) > On the top of the list of the dead symbols is _NPN_IntFromIdentifier, which is > used right in PluginPackage.cpp (the address of the symbol is taken, so it > can't be inlined). How did you generate the list? Was it generated on a build > without netscape plugin support? I regenerated the dead symbol list (QtWebKit release build on Linux) and _NPN_IntFromIdentifier no longer shows up as dead symbol (I do not have an explanation how the _NPN_IntFromIdentifier symbol ended up in the previous list). Here is a brief explanation on how I generated the list: - Make two builds; one with dead symbol stripping, one without it - Get all the defined symbols in each .so by running nm --defined-only - Get the delta of from the two symbol list and demangle the symbols with c++filt |