summaryrefslogtreecommitdiff
path: root/sys/kern/exec_elf.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2018-03-18 13:18:39 +0000
committerchristos <christos@NetBSD.org>2018-03-18 13:18:39 +0000
commitda9316ab8a3866811ff45878de96eddebb0bcaa7 (patch)
tree63a2f9306b41306f07b07182437d4bf6f5c03556 /sys/kern/exec_elf.c
parente5163bfb97d4b0fa304002a81ee6c53c40bf2ad6 (diff)
stsrt with an alignment of 1 (which means no alignment). From alnsn
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r--sys/kern/exec_elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 6bd9b4a5788..8a8afc0956d 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.95 2018/03/18 02:16:21 christos Exp $ */
+/* $NetBSD: exec_elf.c,v 1.96 2018/03/18 13:18:39 christos Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005, 2015 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.95 2018/03/18 02:16:21 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.96 2018/03/18 13:18:39 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -129,7 +129,7 @@ elf_placedynexec(struct exec_package *epp, Elf_Ehdr *eh, Elf_Phdr *ph)
Elf_Addr align, offset;
int i;
- for (align = i = 0; i < eh->e_phnum; i++)
+ for (align = 1, i = 0; i < eh->e_phnum; i++)
if (ph[i].p_type == PT_LOAD && ph[i].p_align > align)
align = ph[i].p_align;