This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Introduce the notion of an interceptor trampoline
ClosedPublic

Authored by melver on May 24 2023, 5:08 AM.

Details

Summary

To make the interceptor implementation more flexible, allowing for 2
levels of indirection instead of just 1 in the current scheme (where the
intercepted function aliases the interceptor implementation), introduce
the notion of an interceptor "trampoline".

A trampoline may be a real function (and not just an alias, where
aliases of aliases do not work), which will simply forward to the
interceptor implementation; the intercepted function will then alias the
trampoline:

func -[alias]-> trampoline -[call]-> interceptor

Make the necessary changes to prepare for introducing real trampolines.

This change does not yet introduce any real trampolines, and so
trampoline == interceptor, and we currently still just have:

func -[alias]-> interceptor

NFC.

Diff Detail

Event Timeline

melver created this revision.May 24 2023, 5:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 5:08 AM
melver requested review of this revision.May 24 2023, 5:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 5:08 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
dvyukov accepted this revision.May 24 2023, 5:11 AM
This revision is now accepted and ready to land.May 24 2023, 5:11 AM
vitalybuka accepted this revision.May 24 2023, 6:07 PM
MaskRay accepted this revision.May 24 2023, 9:13 PM
This revision was landed with ongoing or failed builds.May 25 2023, 3:01 AM
This revision was automatically updated to reflect the committed changes.