This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Intercept weak functions in dll_thunks.
ClosedPublic

Authored by mpividori on Jan 25 2017, 3:42 PM.

Details

Summary

In this diff, I update current implementation of the interception to consider the special case of weak functions.
First we check if the client has redefined the function in the main executable (for example: __sanitizer_cov_trace_pc_guard). It we can't find it, then we look for the default implementation (__sanitizer_cov_trace_pc_guard__dll). The default implementation is always available because the static runtime is linked to the main executable.

Diff Detail

Repository
rL LLVM

Event Timeline

mpividori created this revision.Jan 25 2017, 3:42 PM
mpividori edited the summary of this revision. (Show Details)Jan 25 2017, 3:44 PM
mpividori edited the summary of this revision. (Show Details)
zturner accepted this revision.Jan 26 2017, 11:04 AM

The code looks correct to me, rnk@ does the approach look sound to you?

This revision is now accepted and ready to land.Jan 26 2017, 11:04 AM
This revision was automatically updated to reflect the committed changes.