diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-06-26 04:17:42 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-06-26 04:17:42 +0000 |
commit | 505d4b248b4bdc479a4ae9d87b3955e1c91365e7 (patch) | |
tree | 5ec92a98e8032f82f7ebd060b526b5ea22a8c4c6 /elf/dl-deps.c | |
parent | d8f00d4669ecd16dfb7e52757cccf6bf2f5facbe (diff) | |
download | glibc-505d4b248b4bdc479a4ae9d87b3955e1c91365e7.tar glibc-505d4b248b4bdc479a4ae9d87b3955e1c91365e7.tar.gz glibc-505d4b248b4bdc479a4ae9d87b3955e1c91365e7.tar.bz2 glibc-505d4b248b4bdc479a4ae9d87b3955e1c91365e7.zip |
Update.
2001-06-25 Ulrich Drepper <drepper@redhat.com>
* elf/dl-deps.c (_dl_map_object_deps): Fix handling of failing
_dl_catch_error calls.
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r-- | elf/dl-deps.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c index 9bdaa46ad7..e40f08aa05 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -222,16 +222,18 @@ _dl_map_object_deps (struct link_map *map, { /* 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; @@ -273,6 +275,8 @@ _dl_map_object_deps (struct link_map *map, 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" @@ -282,7 +286,9 @@ _dl_map_object_deps (struct link_map *map, /* 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); @@ -295,6 +301,8 @@ _dl_map_object_deps (struct link_map *map, } 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" @@ -303,10 +311,12 @@ _dl_map_object_deps (struct link_map *map, ? 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; |