llvm-project
43d6e387 - [compiler-rt] Expose shared DSO helpers for compiler-rt runtimes (#191098)

Commit
11 days ago
[compiler-rt] Expose shared DSO helpers for compiler-rt runtimes (#191098) The motivation of this PR is to refactor and expose DSO helper functions so they can be used by all compiler-rt libraries, including the profile library, without duplicating dlopen/dlsym (non-Windows) or LoadLibrary/GetProcAddress (Windows) logic in each runtime. Implement the helpers in namespace __interception in interception_linux.cpp for non-Windows targets and interception_win.cpp for Windows, and use them from the existing Linux interception path for RTLD_NEXT/RTLD_DEFAULT/dlvsym lookups. This is NFC for existing libraries that already use interception's public APIs; sanitizer and interception lit behavior is unchanged.
Author
Parents
Loading