This is an archive of the discontinued LLVM Phabricator instance.

[gold] Match lld WPD behavior for shared library symbols and add test
ClosedPublic

Authored by tejohnson on Feb 15 2021, 9:52 AM.

Details

Summary

lld already marks shared library defs as ExportDynamic, which prevents
potentially unsafe devirtualization of symbols defined in shared
libraries. Match that behavior in the gold plugin, and add the same
test.

Depends on D96721.

Diff Detail

Event Timeline

tejohnson created this revision.Feb 15 2021, 9:52 AM
tejohnson requested review of this revision.Feb 15 2021, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 15 2021, 9:52 AM
MaskRay accepted this revision.Feb 17 2021, 10:47 AM

Great!

llvm/test/tools/gold/X86/devirt_vcall_vis_shared_def.ll
2

The test needs updates.

This revision is now accepted and ready to land.Feb 17 2021, 10:47 AM
tejohnson added inline comments.Feb 17 2021, 11:12 AM
llvm/test/tools/gold/X86/devirt_vcall_vis_shared_def.ll
2

I assume you mean to apply the same fixes I did for the lld patch - will do before committing.

This revision was landed with ongoing or failed builds.Feb 17 2021, 3:29 PM
This revision was automatically updated to reflect the committed changes.