dlopen: log debug message when a library is dlopened

Useful to track what is being used and when
This commit is contained in:
Luca Boccassi
2024-04-03 14:23:04 +01:00
parent e5d4adb173
commit dd6c0df65c
5 changed files with 14 additions and 1 deletions
+2
View File
@@ -668,6 +668,8 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) {
if (!context->tcti_dl)
return log_debug_errno(SYNTHETIC_ERRNO(ENOTRECOVERABLE), "Failed to load %s: %s", fn, dlerror());
log_debug("Loaded '%s' via dlopen()", fn);
func = dlsym(context->tcti_dl, TSS2_TCTI_INFO_SYMBOL);
if (!func)
return log_debug_errno(SYNTHETIC_ERRNO(ENOTRECOVERABLE),