Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
During ThinLTO, avoid merging static data with non-static data with t…
…he same name When doing ThinLTO, the linker updates LTO proxy atoms to point to the right linker atoms. When there are atoms with different scope with the same name (in the case where e.g. one translation unit has a static instance of data and another has a global instance of data with the same name), we may end up making all translation units using a symbol with that name link against the one global symbol with that name. Presumably, the same problem can happen with static/global functions with the same name too. When the data/code under those names happen to be identical, that's fine, but when they're not, bad things happen. So when dealing with LTO proxy atoms for the translation unit scope, don't look up in the list of atoms from the linker (for global symbols). Fixes tpoechtrager#58
- Loading branch information