1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-05 19:35:52 +03:00

Remove duplicate code in elf/dl-deps.c.

This commit is contained in:
Ondřej Bílka
2014-05-27 16:56:11 +02:00
parent 774f928582
commit 3dfb9a5cbe
2 changed files with 23 additions and 31 deletions

View File

@@ -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> 2014-05-27 Andreas Schwab <schwab@suse.de>
* csu/libc-tls.c (__libc_setup_tls): Remove second argument from * csu/libc-tls.c (__libc_setup_tls): Remove second argument from

View File

@@ -302,8 +302,6 @@ _dl_map_object_deps (struct link_map *map,
/* Store the tag in the argument structure. */ /* Store the tag in the argument structure. */
args.name = name; args.name = name;
if (d->d_tag == DT_AUXILIARY)
{
/* Say that we are about to load an auxiliary library. */ /* Say that we are about to load an auxiliary library. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
0)) 0))
@@ -313,11 +311,15 @@ _dl_map_object_deps (struct link_map *map,
DSO_FILENAME (l->l_name)); DSO_FILENAME (l->l_name));
/* We must be prepared that the addressed shared /* We must be prepared that the addressed shared
object is not available. */ object is not available. For filter objects the dependency
must be available. */
bool malloced; bool malloced;
(void) _dl_catch_error (&objname, &errstring, &malloced, int err = _dl_catch_error (&objname, &errstring, &malloced,
openaux, &args); openaux, &args);
if (__glibc_unlikely (errstring != NULL)) if (__glibc_unlikely (errstring != NULL))
{
if (d->d_tag == DT_AUXILIARY)
{ {
/* We are not interested in the error message. */ /* We are not interested in the error message. */
assert (errstring != NULL); assert (errstring != NULL);
@@ -327,23 +329,9 @@ _dl_map_object_deps (struct link_map *map,
/* Simply ignore this error and continue the work. */ /* Simply ignore this error and continue the work. */
continue; continue;
} }
}
else 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))
{
char *new_errstring = strdupa (errstring); char *new_errstring = strdupa (errstring);
objname = strdupa (objname); objname = strdupa (objname);
if (malloced) if (malloced)