Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/sys Pullup 1.69-1.71 [matt]:



details:   https://anonhg.NetBSD.org/src/rev/cfeadbd5790b
branches:  netbsd-1-5
changeset: 490124:cfeadbd5790b
user:      tv <tv%NetBSD.org@localhost>
date:      Fri Nov 03 20:01:37 2000 +0000

description:
Pullup 1.69-1.71 [matt]:
Add vmcmd_readvn (which was the 2nd halt of vmcmd_map_readvn).
=====
Extend the vmcmd stuff a bit.  Add a flags field and define
VMCMD_BASE & VMCMD_RELATIVE.  This allows one to add vmcmds
which are relative to previous entries.  This is needed for
loading the VAX ld.elf_so [releng: and new i386 ld.elf_so]
=====
Bump EXEC_DEFAULT_VMCMD_SETSIZE from 5 to 9, which appears to be the
typical number used by i386 dynamic elf binaries.

diffstat:

 sys/sys/exec.h |  20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diffs (57 lines):

diff -r 72aec5b160f9 -r cfeadbd5790b sys/sys/exec.h
--- a/sys/sys/exec.h    Fri Nov 03 20:00:38 2000 +0000
+++ b/sys/sys/exec.h    Fri Nov 03 20:01:37 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec.h,v 1.68.4.2 2000/10/18 16:23:59 tv Exp $ */
+/*     $NetBSD: exec.h,v 1.68.4.3 2000/11/03 20:01:37 tv Exp $ */
 
 /*-
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -116,7 +116,7 @@
        struct  exec_vmcmd *evs_cmds;
 };
 
-#define        EXEC_DEFAULT_VMCMD_SETSIZE      5       /* # of cmds in set to start */
+#define        EXEC_DEFAULT_VMCMD_SETSIZE      9       /* # of cmds in set to start */
 
 struct exec_package {
        const char *ep_name;            /* file's name */
@@ -156,6 +156,9 @@
        struct  vnode *ev_vp;   /* vnode pointer for the file w/the data */
        u_long  ev_offset;      /* offset in the file for the data */
        u_int   ev_prot;        /* protections for segment */
+       int     ev_flags;
+#define        VMCMD_RELATIVE  0x0001  /* ev_addr is relative to base entry */
+#define        VMCMD_BASE      0x0002  /* marks a base entry */
 };
 
 #ifdef _KERNEL
@@ -182,11 +185,15 @@
 void   new_vmcmd __P((struct exec_vmcmd_set *evsp,
                    int (*proc) __P((struct proc *p, struct exec_vmcmd *)),
                    u_long len, u_long addr, struct vnode *vp, u_long offset,
-                   u_int prot));
+                   u_int prot, int flags));
 #define        NEW_VMCMD(evsp,proc,len,addr,vp,offset,prot) \
-       new_vmcmd(evsp,proc,len,addr,vp,offset,prot);
+       new_vmcmd(evsp,proc,len,addr,vp,offset,prot,0);
+#define        NEW_VMCMD2(evsp,proc,len,addr,vp,offset,prot,flags) \
+       new_vmcmd(evsp,proc,len,addr,vp,offset,prot,flags);
 #else  /* DEBUG */
-#define        NEW_VMCMD(evsp,proc,len,addr,vp,offset,prot) { \
+#define        NEW_VMCMD(evsp,proc,len,addr,vp,offset,prot) \
+       NEW_VMCMD2(evsp,proc,len,addr,vp,offset,prot,0)
+#define        NEW_VMCMD2(evsp,proc,len,addr,vp,offset,prot,flags) do { \
        struct exec_vmcmd *vcp; \
        if ((evsp)->evs_used >= (evsp)->evs_cnt) \
                vmcmdset_extend(evsp); \
@@ -198,7 +205,8 @@
                 VREF(vp); \
         vcp->ev_offset = (offset); \
         vcp->ev_prot = (prot); \
-}
+       vcp->ev_flags = (flags); \
+} while (0)
 #endif /* EXEC_DEBUG */
 
 /*



Home | Main Index | Thread Index | Old Index