else \
{ \
/* This is for DT_AUXILIARY. */ \
- if (_dl_debug_libs) \
+ if (__builtin_expect (_dl_debug_libs, 0)) \
_dl_debug_message (1, "cannot load auxiliary `", __str, \
"' because of empty dynamic string" \
" token substitution\n", NULL); \
args.name = name;
/* Say that we are about to load an auxiliary library. */
- if (_dl_debug_libs)
+ if (__builtin_expect (_dl_debug_libs, 0))
_dl_debug_message (1, "load auxiliary object=",
name, " requested by file=",
l->l_name[0]
else
{
/* Say that we are about to load an auxiliary library. */
- if (_dl_debug_libs)
+ if (__builtin_expect (_dl_debug_libs, 0))
_dl_debug_message (1, "load filtered object=", name,
" requested by file=",
l->l_name[0]
ElfW(Addr) *addrs;
unsigned int cnt;
- if (_dl_debug_impcalls)
+ if (__builtin_expect (_dl_debug_impcalls, 0))
_dl_debug_message (1, "\ncalling preinit: ",
main_map->l_name[0]
? main_map->l_name : _dl_argv[0], "\n\n", NULL);
continue;
/* Print a debug message if wanted. */
- if (_dl_debug_impcalls)
+ if (__builtin_expect (_dl_debug_impcalls, 0))
_dl_debug_message (1, "\ncalling init: ",
l->l_name[0] ? l->l_name : _dl_argv[0],
"\n\n", NULL);
if (runp != NULL)
{
/* The object is still available. Add the reference now. */
- if (act >= undef_map->l_reldepsmax)
+ if (__builtin_expect (act >= undef_map->l_reldepsmax, 0))
{
/* Allocate more memory for the dependency list. Since
this can never happen during the startup phase we can
This means this increment can never be reverted and the
object will never be unloaded. This is semantically the
correct behaviour. */
- if (act < undef_map->l_reldepsmax)
+ if (__builtin_expect (act < undef_map->l_reldepsmax, 1))
undef_map->l_reldeps[undef_map->l_reldepsact++] = map;
/* And increment the counter in the referenced object. */
in the global scope which was dynamically loaded. In this case
we have to prevent the latter from being unloaded unless the
UNDEF_MAP object is also unloaded. */
- if (current_value.m->l_global
+ if (__builtin_expect (current_value.m->l_global, 0)
&& (__builtin_expect (current_value.m->l_type, lt_library)
== lt_loaded)
&& undef_map != current_value.m
break;
}
- if (current_value.s == NULL)
+ if (__builtin_expect (current_value.s == NULL, 0))
{
if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
/* We could find no value for a strong reference. */
in the global scope which was dynamically loaded. In this case
we have to prevent the latter from being unloaded unless the
UNDEF_MAP object is also unloaded. */
- if (current_value.m->l_global
+ if (__builtin_expect (current_value.m->l_global, 0)
&& (__builtin_expect (current_value.m->l_type, lt_library)
== lt_loaded)
&& undef_map != current_value.m
break;
}
- if (current_value.s == NULL)
+ if (__builtin_expect (current_value.s == NULL, 0))
{
*ref = NULL;
return 0;
in the global scope which was dynamically loaded. In this case
we have to prevent the latter from being unloaded unless the
UNDEF_MAP object is also unloaded. */
- if (current_value.m->l_global
+ if (__builtin_expect (current_value.m->l_global, 0)
&& (__builtin_expect (current_value.m->l_type, lt_library)
== lt_loaded)
&& undef_map != current_value.m
break;
}
- if (res < 0)
+ if (__builtin_expect (res, 0) < 0)
{
/* Oh, oh. The file named in the relocation entry does not
contain the needed symbol. */
}
}
- if (current_value.s == NULL)
+ if (__builtin_expect (current_value.s == NULL, 0))
{
if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
/* We could find no value for a strong reference. */
in the global scope which was dynamically loaded. In this case
we have to prevent the latter from being unloaded unless the
UNDEF_MAP object is also unloaded. */
- if (current_value.m->l_global
+ if (__builtin_expect (current_value.m->l_global, 0)
&& (__builtin_expect (current_value.m->l_type, lt_library)
== lt_loaded)
&& undef_map != current_value.m
break;
}
- if (current_value.s == NULL)
+ if (__builtin_expect (current_value.s == NULL, 0))
{
if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
{