aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile4
-rw-r--r--elf/dl-error.c2
-rw-r--r--elf/dl-load.c5
3 files changed, 5 insertions, 6 deletions
diff --git a/elf/Makefile b/elf/Makefile
index e608acf..685a027 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -46,8 +46,6 @@ libdl-map := libdl.map
before-compile = $(objpfx)trusted-dirs.h $(objpfx)rtldtbl.h
-# We need GNU awk for the genrtldtbl.awk script.
-GAWK = gawk
all: # Make this the default target; it will be defined in Rules.
@@ -149,7 +147,7 @@ $(objpfx)trusted-dirs.h: Makefile
mv -f $@T $@
$(objpfx)rtldtbl.h: Makefile
$(make-target-directory)
- echo "$(default-rpath)" | $(GAWK) -f genrtldtbl.awk > $@T
+ echo "$(default-rpath)" | awk -f genrtldtbl.awk > $@T
mv -f $@T $@
CPPFLAGS-dl-load.c = -I$(objdir)/$(subdir)
CFLAGS-dl-load.c += -Wno-uninitialized
diff --git a/elf/dl-error.c b/elf/dl-error.c
index 5e76d7d..3cfe48f 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -80,7 +80,7 @@ _dl_signal_error (int errcode,
char buffer[1024];
_dl_sysdep_fatal (_dl_argv[0] ?: "<program name unknown>",
": error in loading shared libraries: ",
- objname ?: "", objname ? ": " : "",
+ objname ?: "", objname && *objname ? ": " : "",
errstring, errcode ? ": " : "",
(errcode
? _strerror_internal (errcode, buffer, sizeof buffer)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0b75267..91b8c2a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -420,7 +420,7 @@ _dl_init_paths (void)
if (_dl_platform != NULL)
{
- char *tmp;
+ char *tmp, *orig;
relem->machdirnamelen = relem->dirnamelen + _dl_platformlen + 1;
tmp = (char *) malloc (relem->machdirnamelen + 1);
@@ -428,11 +428,12 @@ _dl_init_paths (void)
_dl_signal_error (ENOMEM, NULL,
"cannot create cache for search path");
- relem->dirname = tmp;
+ orig = tmp;
tmp = __mempcpy (tmp, relem->dirname, relem->dirnamelen);
tmp = __mempcpy (tmp, _dl_platform, _dl_platformlen);
*tmp++ = '/';
*tmp = '\0';
+ relem->dirname = orig;
relem->machdirstatus = unknown;