This is an archive of the discontinued LLVM Phabricator instance.

[MachO][TLOF] Add support for local symbols in the indirect symbol table
ClosedPublic

Authored by thegameg on Dec 11 2018, 1:05 PM.

Details

Summary

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.

Diff Detail

Event Timeline

thegameg created this revision.Dec 11 2018, 1:05 PM
Gerolf added a subscriber: Gerolf.Dec 12 2018, 7:36 PM
Gerolf added inline comments.
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
1122

Please add the comment from radar about this change.

thegameg updated this revision to Diff 178045.Dec 13 2018, 6:28 AM
thegameg added a reviewer: Gerolf.

Add more comments regarding local indirect symbols.

Gerolf accepted this revision.Dec 13 2018, 9:12 AM

LGTM

This revision is now accepted and ready to land.Dec 13 2018, 9:12 AM
This revision was automatically updated to reflect the committed changes.