Skip to content

Commit

Permalink
[dlopen] use RTLD_NOW instead of RTLD_LAZY to avoid perf hit on fast …
Browse files Browse the repository at this point in the history
…path

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Sep 14, 2017
1 parent 138aad1 commit 8d16563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libknet/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void *open_lib(knet_handle_t knet_h, const char *libname, int extra_flags)
*/
dlerror();

ret = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | extra_flags);
ret = dlopen(libname, RTLD_NOW | RTLD_GLOBAL | extra_flags);
error = dlerror();
if (error != NULL) {
log_err(knet_h, KNET_SUB_COMMON, "unable to dlopen %s: %s",
Expand Down

0 comments on commit 8d16563

Please sign in to comment.