This is an archive of the discontinued LLVM Phabricator instance.

ELF: Re-implement -u directly and remove CanKeepUndefined flag.
ClosedPublic

Authored by pcc on Apr 26 2016, 2:53 PM.

Details

Summary

The semantics of the -u flag are to load the lazy symbol named by the flag. We
were previously relying on this behavior falling out of symbol resolution
against a synthetic undefined symbol, but that didn't quite give us the
correct behavior, so we needed a flag to mark symbols created with -u so
we could treat them specially in the writer. However, it's simpler and less
error prone to implement the required behavior directly and remove the flag.

This fixes an issue where symbols loaded with -u would receive hidden
visibility even when the definition in an object file had wider visibility.

Diff Detail

Event Timeline

pcc updated this revision to Diff 55099.Apr 26 2016, 2:53 PM
pcc retitled this revision from to ELF: Re-implement -u directly and remove CanKeepUndefined flag..
pcc updated this object.
pcc added reviewers: rafael, ruiu.
pcc added a subscriber: llvm-commits.
ruiu accepted this revision.Apr 26 2016, 5:02 PM
ruiu edited edge metadata.

LGTM. This is beautiful.

This revision is now accepted and ready to land.Apr 26 2016, 5:02 PM
This revision was automatically updated to reflect the committed changes.