diff options
author | etheisen <etheisen@cvs.openbsd.org> | 1996-06-16 20:05:09 +0000 |
---|---|---|
committer | etheisen <etheisen@cvs.openbsd.org> | 1996-06-16 20:05:09 +0000 |
commit | 027a201fdfbd56d151034e4714f0a02de9085a4b (patch) | |
tree | 6e22ec24bd6b21e7ea3465d1b49b9dcc83524a11 /sys/kern/exec_elf.c | |
parent | 2d566a350b93f2e5e18d326a55646c297c7487ac (diff) |
Whoops. Don't forget to take alignment into account when processing file.
Thanks Per.
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r-- | sys/kern/exec_elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index efa3f04e3f4..a5430d47328 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.11 1996/06/15 07:30:05 etheisen Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.12 1996/06/16 20:05:08 etheisen Exp $ */ /* $NetBSD: exec_elf.c,v 1.6 1996/02/09 18:59:18 christos Exp $ */ /* @@ -377,7 +377,8 @@ elf_load_file(p, path, vcset, entry, ap, last) /* If entry is within this section it must be text */ if (eh.e_entry >= ph[i].p_vaddr && eh.e_entry < (ph[i].p_vaddr + size)) { - *entry = addr + eh.e_entry - ph[i].p_vaddr; + *entry = addr + eh.e_entry - + ELF_ALIGN(ph[i].p_vaddr,ph[i].p_align); ap->arg_interp = addr; } addr += size; |