{
/* Map in the needed object. */
struct link_map *dep;
+ int err;
/* Recognize DSTs. */
name = expand_dst (l, strtab + d->d_un.d_val, 0);
/* Store the tag in the argument structure. */
args.name = name;
- if (_dl_catch_error (&objname, &errstring, openaux, &args))
+ err = _dl_catch_error (&objname, &errstring, openaux, &args);
+ if (__builtin_expect (errstring != NULL, 0))
{
- if (errno)
- errno_reason = errno;
+ if (err)
+ errno_reason = err;
else
errno_reason = -1;
goto out;
if (d->d_tag == DT_AUXILIARY)
{
+ int err;
+
/* Say that we are about to load an auxiliary library. */
if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
_dl_debug_printf ("load auxiliary object=%s"
/* We must be prepared that the addressed shared
object is not available. */
- if (_dl_catch_error (&objname, &errstring, openaux, &args))
+ err = _dl_catch_error (&objname, &errstring, openaux,
+ &args);
+ if (__builtin_expect (errstring != NULL, 0))
{
/* We are not interested in the error message. */
assert (errstring != NULL);
}
else
{
+ int err;
+
/* Say that we are about to load an auxiliary library. */
if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
_dl_debug_printf ("load filtered object=%s"
? l->l_name : _dl_argv[0]);
/* For filter objects the dependency must be available. */
- if (_dl_catch_error (&objname, &errstring, openaux, &args))
+ err = _dl_catch_error (&objname, &errstring, openaux,
+ &args);
+ if (__builtin_expect (errstring != NULL, 0))
{
- if (errno)
- errno_reason = errno;
+ if (err)
+ errno_reason = err;
else
errno_reason = -1;
goto out;