}
/* Print debugging message. */
- if (_dl_debug_files)
+ if (__builtin_expect (_dl_debug_files, 0))
_dl_debug_message (1, "file=", name, "; generating link map\n", NULL);
/* Read the header directly. */
l->l_entry += l->l_addr;
- if (_dl_debug_files)
+ if (__builtin_expect (_dl_debug_files, 0))
{
const size_t nibbles = sizeof (void *) * 2;
char buf1[nibbles + 1];
/* If we are debugging the search for libraries print the path
now if it hasn't happened now. */
- if (_dl_debug_libs && current_what != this_dir->what)
+ if (__builtin_expect (_dl_debug_libs, 0)
+ && current_what != this_dir->what)
{
current_what = this_dir->what;
print_search_path (dirs, current_what, this_dir->where);
- buf);
/* Print name we try if this is wanted. */
- if (_dl_debug_libs)
+ if (__builtin_expect (_dl_debug_libs, 0))
_dl_debug_message (1, " trying file=", buf, "\n", NULL);
fd = __open (buf, O_RDONLY);
}
/* Display information if we are debugging. */
- if (_dl_debug_files && loader != NULL)
+ if (__builtin_expect (_dl_debug_files, 0) && loader != NULL)
_dl_debug_message (1, "\nfile=", name, "; needed by ",
loader->l_name[0] ? loader->l_name : _dl_argv[0],
"\n", NULL);
size_t namelen = strlen (name) + 1;
- if (_dl_debug_libs)
+ if (__builtin_expect (_dl_debug_libs, 0))
_dl_debug_message (1, "find library=", name, "; searching\n", NULL);
fd = -1;
fd = open_path (name, namelen, preloaded, rtld_search_dirs, &realname);
/* Add another newline when we a tracing the library loading. */
- if (_dl_debug_libs)
+ if (__builtin_expect (_dl_debug_libs, 0))
_dl_debug_message (1, "\n", NULL);
}
else