This is an archive of the discontinued LLVM Phabricator instance.

[XRay][CodeGen] Use PIC-friendly code in XRay sleds and remove synthetic references in .text
ClosedPublic

Authored by dberris on Sep 1 2017, 12:28 AM.

Details

Summary

This is a re-roll of D36615 which uses PLT relocations in the back-end
to the call to __xray_CustomEvent() when building in -fPIC and
-fxray-instrument mode.

Event Timeline

dberris created this revision.Sep 1 2017, 12:28 AM
pcc accepted this revision.Sep 1 2017, 9:18 AM

LGTM

test/CodeGen/X86/xray-custom-log.ll
17–29

Add another RUN line above with -relocation-model=pic so you can test for @PLT here.

This revision is now accepted and ready to land.Sep 1 2017, 9:18 AM
dberris updated this revision to Diff 113723.Sep 3 2017, 10:34 PM
dberris marked an inline comment as done.
dberris edited the summary of this revision. (Show Details)

Add a test in the back-end for PLT calls to __xray_CustomEvent.

This revision was automatically updated to reflect the committed changes.