This is an archive of the discontinued LLVM Phabricator instance.

[xray] Use hidden symbol visibility for xray trampolines
ClosedPublic

Authored by ianlevesque on Apr 21 2020, 3:23 PM.

Details

Summary

We load multiple copies of the trampolines into memory when instrumenting DSOs. Hidden visibility prevents conflicts in this scenario.

Diff Detail

Event Timeline

ianlevesque created this revision.Apr 21 2020, 3:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2020, 3:23 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
dberris accepted this revision.Apr 21 2020, 7:14 PM

LGTM for the x86_64 bits.

This revision is now accepted and ready to land.Apr 21 2020, 7:14 PM
MaskRay accepted this revision.Apr 21 2020, 8:09 PM

I haven't studied these tranpolines yet but it is correct to use hidden visibility on ELF (no-op on Mach-O). This can avoid PLT entries for shared objects.

This revision was automatically updated to reflect the committed changes.