Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sbin/modload Pull up revision 1.4 (requested by jdolecek):
details: https://anonhg.NetBSD.org/src/rev/ada7617b2b7d
branches: netbsd-1-5
changeset: 490488:ada7617b2b7d
user: jhawk <jhawk%NetBSD.org@localhost>
date: Thu Jan 25 14:35:20 2001 +0000
description:
Pull up revision 1.4 (requested by jdolecek):
Ensure that data_hole is aligned to a section, otherwise
elf_mod_sizes() may report a size too small, affecting LKM loading.
diffstat:
sbin/modload/elf.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r b076ff8cf8e0 -r ada7617b2b7d sbin/modload/elf.c
--- a/sbin/modload/elf.c Thu Jan 25 14:30:27 2001 +0000
+++ b/sbin/modload/elf.c Thu Jan 25 14:35:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: elf.c,v 1.3 1999/10/25 13:58:04 kleink Exp $ */
+/* $NetBSD: elf.c,v 1.3.6.1 2001/01/25 14:35:20 jhawk Exp $ */
/*
* Copyright (c) 1998 Johan Danielsson <joda%pdc.kth.se@localhost>
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: elf.c,v 1.3 1999/10/25 13:58:04 kleink Exp $");
+__RCSID("$NetBSD: elf.c,v 1.3.6.1 2001/01/25 14:35:20 jhawk Exp $");
#include <sys/param.h>
@@ -211,7 +211,8 @@
s->addr);
data_offset = off;
/* later remove size of compressed hole from off */
- data_hole = (ssize_t)s->addr - off;
+#define ROUND(V, S) (((V) + (S) - 1) & ~((S) - 1))
+ data_hole = (ssize_t)s->addr - ROUND(off, s->align);
}
off = (ssize_t)s->addr + s->size;
}
@@ -222,7 +223,6 @@
free(strtab);
/* XXX round to pagesize? */
-#define ROUND(V, S) (((V) + (S) - 1) & ~((S) - 1))
*modsize = ROUND(off, sysconf(_SC_PAGESIZE));
/*
Home |
Main Index |
Thread Index |
Old Index