[MachO][TLOF] Add support for local symbols in the indirect symbol table
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 13 Dec 2018 17:23:30 +0000 (17:23 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 13 Dec 2018 17:23:30 +0000 (17:23 +0000)
commit91e69d8a929c25fb94c6f3b8efe2160d987e5562
tree6edff0063fa6d1965e0dfe32180118a416a1e977
parent0250e29e50da8a0cd4572fe0ca0079c1995c69d9
[MachO][TLOF] Add support for local symbols in the indirect symbol table

On 32-bit archs, before, we would assume that an indirect symbol will
never have local linkage. This can lead to miscompiles where the
symbol's value would be 0 and the linker would use that value, because
the indirect symbol table would contain the value
`INDIRECT_SYMBOL_LOCAL` for that specific symbol.

Differential Revision: https://reviews.llvm.org/D55573

llvm-svn: 349060
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/MC/MachO/cstexpr-gotpcrel-32.ll