diff --git a/src/ldpreload.h b/src/ldpreload.h index 6ef2911..57f923b 100644 --- a/src/ldpreload.h +++ b/src/ldpreload.h @@ -30,6 +30,12 @@ #include #include +static void *dlsym_function(char const *name) +#ifdef HAVE___ATTRIBUTE__ + __attribute__((noinline)) +#endif +; + /* Load the function name using dlsym() and return it. Terminate program on * failure. Split in function and macro to reduce code inserted into the * function using the macro. */ diff --git a/src/trackfds.h b/src/trackfds.h index 175f1e3..eddff4c 100644 --- a/src/trackfds.h +++ b/src/trackfds.h @@ -300,7 +300,7 @@ static int tracked_fds_remove(int fd) { return 0; } -static int tracked_fds_find_slow(int fd); +static int tracked_fds_find_slow(int fd) __noinline; /* * tracked_fds_find() is called for each hook call and should be as fast as * possible. As most file descriptors are < TRACKFDS_STATIC_COUNT, force the