Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 in netbsd32_elf32_probe(), 'pos' is real...
details: https://anonhg.NetBSD.org/src/rev/79391aee0aa9
branches: trunk
changeset: 499881:79391aee0aa9
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Dec 01 08:59:02 2000 +0000
description:
in netbsd32_elf32_probe(), 'pos' is really a pointer to an Elf_Addr, not a
vaddr_t. cast the pointer before dereferencing it to avoid the alignment
fault that broke compat_netbsd32, cuz pos is defined like:
Elf_Addr phdr = 0, pos = 0;
in exec_elf32.c.
diffstat:
sys/compat/netbsd32/netbsd32_exec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r fd9897556f31 -r 79391aee0aa9 sys/compat/netbsd32/netbsd32_exec.c
--- a/sys/compat/netbsd32/netbsd32_exec.c Fri Dec 01 08:02:34 2000 +0000
+++ b/sys/compat/netbsd32/netbsd32_exec.c Fri Dec 01 08:59:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_exec.c,v 1.24 2000/11/27 17:25:25 jdolecek Exp $ */
+/* $NetBSD: netbsd32_exec.c,v 1.25 2000/12/01 08:59:02 mrg Exp $ */
/* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
/*
@@ -116,7 +116,7 @@
free((void *)bp, M_TEMP);
}
epp->ep_flags |= EXEC_32;
- *pos = ELFDEFNNAME(NO_ADDR);
+ *(Elf_Addr *)pos = ELFDEFNNAME(NO_ADDR);
return 0;
}
#endif
Home |
Main Index |
Thread Index |
Old Index