ELF: Set symbol binding to STB_GLOBAL when undefining symbols during LTO.
If there is a bug in the LTO implementation that causes it to fail to provide an expected symbol definition, the linker should report an undefined symbol error. Unfortunately, we were failing to do so if the symbol definition was weak, as the undefine() function was turning the definition into a weak undefined symbol, which resolves to zero if the symbol remains undefined. This patch causes us to set the binding to STB_GLOBAL when we undefine a symbol. I can't see a good way to test this. The behaviour should only be observable if there is a bug in the LTO implementation. Differential Revision: https://reviews.llvm.org/D32731 llvm-svn: 301897
Loading
Please register or sign in to comment