Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/modload Don't try to play games with the BSS; just make...



details:   https://anonhg.NetBSD.org/src/rev/1201ef8ae802
branches:  trunk
changeset: 474796:1201ef8ae802
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Jul 21 03:32:53 1999 +0000

description:
Don't try to play games with the BSS; just make it work.

diffstat:

 sbin/modload/elf.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r aff7d1a4003c -r 1201ef8ae802 sbin/modload/elf.c
--- a/sbin/modload/elf.c        Wed Jul 21 03:18:21 1999 +0000
+++ b/sbin/modload/elf.c        Wed Jul 21 03:32:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf.c,v 1.1 1999/06/13 12:54:40 mrg Exp $      */
+/*     $NetBSD: elf.c,v 1.2 1999/07/21 03:32:53 mycroft 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.1 1999/06/13 12:54:40 mrg Exp $");
+__RCSID("$NetBSD: elf.c,v 1.2 1999/07/21 03:32:53 mycroft Exp $");
 
 #include <sys/param.h>
 
@@ -195,7 +195,7 @@
        strtab = read_string_table(fd, &ehdr);
        read_sections(fd, &ehdr, strtab, &head);
 
-       for (s = head; s && s->next; s = s->next) {
+       for (s = head; s; s = s->next) {
                if (debug)
                        fprintf(stderr, 
                            "%s: addr = %p size = %#lx align = %#lx\n", 
@@ -324,8 +324,8 @@
                        addr = (char*)s->addr + s->size;
                }
        }
-       /* any trailing zero_space will be filled with zeros by the
-           LKM framework */
+       if (zero_size)
+               loadspace(zero_size);
        
        free_sections(head);
        free(strtab);



Home | Main Index | Thread Index | Old Index