Investigate stripping of module-required code from libchrome.so |
||||
Issue descriptionDuring prototyping, torne@ warned that code unused by libchrome.so/libmonochrome.so may be stripped from the libraries. It may not be sufficient to require that those particular symbols be made global at link time. We need to confirm whether or not this is a problem, by adding dummy code to the core library, and ensuring that it persists for use by a module. More explanation is given in the context of the component build, here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/component_build.md#static-library-symbol-export-issues
,
Aug 22
Richard, I synthesized a situation in the Android build in which libchrome.so includes source in a static library that's only used by the feature module .so. I was attempting to encounter the situation where the static library's source is stripped out of libchrome.so, and the module fails to load because of a missing symbol. However, everything works fine. Similarly, I didn't encounter issues with other code along the way, albeit that code's all in source sets, which eliminates the problem. I'd postulated that maybe if the linker is asked to make a symbol global, that it will indeed keep code around that isn't otherwise used by the library. Do you have advice on understanding why a linker keeps a certain symbol around, or doesn't?
,
Jan 3
,
Jan 14
This issue has not shown to be an issue using the auto-generated stub approach. Closing this issue; we can reopen or recreate it if needed. |
||||
►
Sign in to add a comment |
||||
Comment 1 by cjgrant@chromium.org
, Aug 16