On 2014-06-03, 5:57 AM, Henri Sivonen wrote:
On Wed, May 28, 2014 at 5:45 PM, Nathan Froyd <froy...@mozilla.com> wrote:
Assuming that ICU is already compiled with the moral equivalent of GCC's
-ffunction-sections -fdata-sections or MSVC's /Gy, then statically linking ICU
into libxul should already strip out all the un-needed ICU bits (when using the
appropriate linker option).
Disabling ICU IDNA code made libxul smaller, so it seems practice
doesn't match the above theory. (I.e. clearly the linker wasn't
automatically dropping ICU IDNA code.)
The linker can only eliminate symbols that are not referenced by
anything else. Basically the linker creates a graph and preserves
everything that is referenced by some roots, for example, main, static
initializers, and very importantly, vtables. So, anything that is a
virtual function or is referenced by one will remain in the binary even
if there is no code _calling_ that virtual function anywhere.
Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform