summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-11-09 19:57:49 +0000
committerJakub Jelinek <jakub@redhat.com>2006-11-09 19:57:49 +0000
commitdddf300c357a38a1d26a97ade2e905a0f85befe3 (patch)
tree216f66ce0825df1efaa3ffa64527ee5f924bf8e9 /elf
parent2c72abb4969f2b376a5e58c88424bd3b9c9c70b5 (diff)
Updated to fedora-glibc-20061109T1949
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-debug.c2
-rw-r--r--elf/dl-load.c31
2 files changed, 13 insertions, 20 deletions
diff --git a/elf/dl-debug.c b/elf/dl-debug.c
index d00fe87fbb..2538364aec 100644
--- a/elf/dl-debug.c
+++ b/elf/dl-debug.c
@@ -54,7 +54,7 @@ _dl_debug_initialize (ElfW(Addr) ldbase, Lmid_t ns)
else
r = &GL(dl_ns)[ns]._ns_debug;
- if (r->r_brk == 0 || ldbase != 0)
+ if (r->r_map == NULL || ldbase != 0)
{
/* Tell the debugger where to find the map of loaded objects. */
r->r_version = 1 /* R_DEBUG_VERSION XXX */;
diff --git a/elf/dl-load.c b/elf/dl-load.c
index ccbbf4fdd2..1650ef953a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -511,7 +511,7 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
}
-static void
+static bool
internal_function
decompose_rpath (struct r_search_path_struct *sps,
const char *rpath, struct link_map *l, const char *what)
@@ -546,19 +546,8 @@ decompose_rpath (struct r_search_path_struct *sps,
{
/* This object is on the list of objects for which the
RUNPATH and RPATH must not be used. */
- result = calloc (1, sizeof *result);
- if (result == NULL)
- {
- signal_error_cache:
- errstring = N_("cannot create cache for search path");
- signal_error:
- _dl_signal_error (ENOMEM, NULL, NULL, errstring);
- }
-
- sps->dirs = result;
- sps->malloced = 1;
-
- return;
+ sps->dirs = (void *) -1;
+ return false;
}
while (*inhp != '\0')
@@ -588,7 +577,11 @@ decompose_rpath (struct r_search_path_struct *sps,
result = (struct r_search_path_elem **) malloc ((nelems + 1 + 1)
* sizeof (*result));
if (result == NULL)
- goto signal_error_cache;
+ {
+ errstring = N_("cannot create cache for search path");
+ signal_error:
+ _dl_signal_error (ENOMEM, NULL, NULL, errstring);
+ }
fillin_rpath (copy, result, ":", 0, what, where);
@@ -599,6 +592,7 @@ decompose_rpath (struct r_search_path_struct *sps,
sps->dirs = result;
/* The caller will change this value if we haven't used a real malloc. */
sps->malloced = 1;
+ return true;
}
/* Make sure cached path information is stored in *SP
@@ -623,10 +617,9 @@ cache_rpath (struct link_map *l,
}
/* Make sure the cache information is available. */
- decompose_rpath (sp, (const char *) (D_PTR (l, l_info[DT_STRTAB])
- + l->l_info[tag]->d_un.d_val),
- l, what);
- return true;
+ return decompose_rpath (sp, (const char *) (D_PTR (l, l_info[DT_STRTAB])
+ + l->l_info[tag]->d_un.d_val),
+ l, what);
}