----- Original Message ----- > Is there a way to give the linker a list of functions that you want to have > as public entry points of a dynamically linked library, and have it strip > out everything that can’t be reached from these functions? That’s > essentially what happens when you statically link a library into another, > and the list of ICU functions that Mozilla code calls wouldn’t be > excessively long. The bulk of them can be found in this stubs section: > http://mxr.mozilla.org/mozilla-central/source/js/src/builtin/Intl.cpp#62
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). I see that intl/icu/source/configure.ac has bits to turn those on for Linux, but not for Mac or Windows. I can't tell whether we enable all the flags to convince ICU to use those options, though we might be passing some of Gecko's compilation flags into ICU's build process, in which case this is a moot point. For the dynamic library case, if you're using symbol maps (Linux) or export lists (Windows), using -ffunction-sections -fdata-sections or equivalent should given you the same effect, assuming you trim down your mapfile appropriately. -Nathan _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform