This is an archive of the discontinued LLVM Phabricator instance.

Store the real binding of shared symbols
ClosedPublic

Authored by rafael on Nov 27 2017, 9:26 AM.

Details

Reviewers
ruiu
pcc
Summary

Currently we mark every shared symbol as STB_WEAK.

That is a hack to make it easy to decide when a .so is needed or not because of a reference to a given symbol.

That hack leaks when we create copy relocations as shown by the update to relocation-copy-alias.s.

This patch stores the original binding when we first read a shared symbol. We still have to update the binding to weak if we see a weak undef, but I find the logic easier to read where it is now.

Diff Detail

Event Timeline

rafael created this revision.Nov 27 2017, 9:26 AM
ruiu accepted this revision.Nov 27 2017, 9:58 AM

LGTM

This revision is now accepted and ready to land.Nov 27 2017, 9:58 AM
espindola closed this revision.Mar 14 2018, 3:23 PM
espindola added a subscriber: espindola.

319127