aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c15
-rw-r--r--elf/dlerror.c9
2 files changed, 13 insertions, 11 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 6433b32..16534f4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -182,9 +182,13 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
struct r_search_path_elem *dirp;
size_t len = strlen (cp);
- /* `strsep' can pass an empty string. */
+ /* `strsep' can pass an empty string. This has to be
+ interpreted as `use the current directory'. */
if (len == 0)
- continue;
+ {
+ static char curwd[2];
+ cp = strcpy (curwd, ".");
+ }
/* Remove trailing slashes. */
while (len > 1 && cp[len - 1] == '/')
@@ -331,8 +335,11 @@ _dl_init_paths (const char *llp)
const char *cp = llp;
nllp = 1;
while (*cp)
- if (*cp++ == ':')
- ++nllp;
+ {
+ if (*cp == ':' || *cp == ';')
+ ++nllp;
+ ++cp;
+ }
}
else
nllp = 0;
diff --git a/elf/dlerror.c b/elf/dlerror.c
index ba25611..4716bdd 100644
--- a/elf/dlerror.c
+++ b/elf/dlerror.c
@@ -56,13 +56,8 @@ dlerror (void)
}
/* Get error string. */
- if (__libc_internal_tsd_get != NULL)
- {
- result = (struct dl_action_result *) __libc_getspecific (key);
- if (result == NULL)
- result = &last_result;
- }
- else
+ result = (struct dl_action_result *) __libc_getspecific (key);
+ if (result == NULL)
result = &last_result;
if (! result->errstring)