Skip to content

Commit

Permalink
Update intercept comment
Browse files Browse the repository at this point in the history
  • Loading branch information
igor725 committed May 28, 2024
1 parent 82a1e3f commit 5d6b5cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/runtime/exports/intern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ void init() {
void initIntercepts() {
/*Usage
// functions has to be of SYSV_ABI!
accessRuntimeExport()->interceptAdd((uintptr_t)int_Malloc, "Y7aJ1uydPMo", "libc", "libc")
accessRuntimeLinker().interceptAdd((uintptr_t)int_Malloc, "Y7aJ1uydPMo", "libc", "libc")
// Calling original
auto const origFunction = accessRuntimeExport()->interceptGetAddr((uintptr_t)int_Malloc);
auto const origFunction = accessRuntimeLinker().interceptGetAddr((uintptr_t)int_Malloc);
typedef SYSV_ABI void* (*fcnPtr)(void*, size_t);
void* ret = ((fcnPtr)origFunction)(ptr, size);
*/
}
} // namespace intern
} // namespace intern

0 comments on commit 5d6b5cd

Please sign in to comment.