This is an archive of the discontinued LLVM Phabricator instance.

Allow dso_local on ifunc
ClosedPublic

Authored by espindola on Jan 10 2018, 7:01 PM.

Details

Summary

It was never fully disallowed. We were rejecting it in the asm parser, but not in the verifier.

Currently TargetMachine::shouldAssumeDSOLocal returns true for hidden ifuncs. I considered changing it and moving the check from the asm parser to the verifier.

The reason for deciding to allow it instead is that all linkers handle a direct reference just fine. They use the plt address as the address of the function. In fact doing that means that clang doesn't have the same bug as gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83782.

This patch then removes the check from the asm parser and updates the bitcode reader and writer.

Diff Detail

Event Timeline

espindola created this revision.Jan 10 2018, 7:01 PM
rnk accepted this revision.Jan 12 2018, 7:52 AM

lgtm

Sorry for the delay, I'm on vacation.

This revision is now accepted and ready to land.Jan 12 2018, 7:52 AM