aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-deps.c2
-rw-r--r--elf/dl-misc.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 1c383b7b98..b8dee8ab52 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -144,7 +144,7 @@ _dl_map_object_deps (struct link_map *map,
struct link_map **preloads, unsigned int npreloads,
int trace_mode, int open_mode)
{
- struct list known[1 + npreloads + 1];
+ struct list *known = __alloca (sizeof *known * (1 + npreloads + 1));
struct list *runp, *tail;
unsigned int nlist, i;
/* Object name. */
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index abc5cbb853..41ef26131d 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -88,8 +88,8 @@ _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
static void
_dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
{
- const int niovmax = 64;
- struct iovec iov[niovmax];
+# define NIOVMAX 64
+ struct iovec iov[NIOVMAX];
int niov = 0;
pid_t pid = 0;
char pidbuf[12];
@@ -115,7 +115,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
}
/* Append to the output. */
- assert (niov < niovmax);
+ assert (niov < NIOVMAX);
iov[niov].iov_len = 12;
iov[niov++].iov_base = pidbuf;
@@ -128,7 +128,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
++fmt;
/* Append constant string. */
- assert (niov < niovmax);
+ assert (niov < NIOVMAX);
if ((iov[niov].iov_len = fmt - startp) != 0)
iov[niov++].iov_base = (char *) startp;