espindola added a comment. Actually, I misread the location of the call to demoteSharedSymbols. I now think this is the proper fix as it just simplifies the symbols before we start processing the relocations. https://reviews.llvm.org/D46036