]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove duplicate code in elf/dl-deps.c.
authorOndřej Bílka <neleai@seznam.cz>
Tue, 27 May 2014 14:56:11 +0000 (16:56 +0200)
committerOndřej Bílka <neleai@seznam.cz>
Tue, 27 May 2014 14:56:39 +0000 (16:56 +0200)
ChangeLog
elf/dl-deps.c

index 9d1ae9c70077cc9b3b4af82509983977d121b20e..3ddd69b2a0cd827f04470d7ed4168cece509e263 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-27  Ondřej Bílka  <neleai@seznam.cz>
+
+       * elf/dl-deps.c (_dl_map_object_deps): Remove duplicate code.
+
 2014-05-27  Andreas Schwab  <schwab@suse.de>
 
        * csu/libc-tls.c (__libc_setup_tls): Remove second argument from
index 9c83c8177955f9caada4bbd36eadfae82c10ebfa..c3b0cfc908015acae8a2b524dbc27fd2e676223c 100644 (file)
@@ -302,22 +302,24 @@ _dl_map_object_deps (struct link_map *map,
                /* Store the tag in the argument structure.  */
                args.name = name;
 
-               if (d->d_tag == DT_AUXILIARY)
+               /* Say that we are about to load an auxiliary library.  */
+               if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
+                                     0))
+                 _dl_debug_printf ("load auxiliary object=%s"
+                                   " requested by file=%s\n",
+                                   name,
+                                   DSO_FILENAME (l->l_name));
+
+               /* We must be prepared that the addressed shared
+                  object is not available.  For filter objects the dependency
+                  must be available.  */
+               bool malloced;
+               int err = _dl_catch_error (&objname, &errstring, &malloced,
+                                       openaux, &args);
+
+               if (__glibc_unlikely (errstring != NULL))
                  {
-                   /* Say that we are about to load an auxiliary library.  */
-                   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
-                                         0))
-                     _dl_debug_printf ("load auxiliary object=%s"
-                                       " requested by file=%s\n",
-                                       name,
-                                       DSO_FILENAME (l->l_name));
-
-                   /* We must be prepared that the addressed shared
-                      object is not available.  */
-                   bool malloced;
-                   (void) _dl_catch_error (&objname, &errstring, &malloced,
-                                           openaux, &args);
-                   if (__glibc_unlikely (errstring != NULL))
+                   if (d->d_tag == DT_AUXILIARY)
                      {
                        /* We are not interested in the error message.  */
                        assert (errstring != NULL);
@@ -327,23 +329,9 @@ _dl_map_object_deps (struct link_map *map,
                        /* Simply ignore this error and continue the work.  */
                        continue;
                      }
-                 }
-               else
-                 {
-                   /* Say that we are about to load an auxiliary library.  */
-                   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
-                                         0))
-                     _dl_debug_printf ("load filtered object=%s"
-                                       " requested by file=%s\n",
-                                       name,
-                                       DSO_FILENAME (l->l_name));
-
-                   /* For filter objects the dependency must be available.  */
-                   bool malloced;
-                   int err = _dl_catch_error (&objname, &errstring, &malloced,
-                                              openaux, &args);
-                   if (__glibc_unlikely (errstring != NULL))
+                   else
                      {
+
                        char *new_errstring = strdupa (errstring);
                        objname = strdupa (objname);
                        if (malloced)