From owner-p4-projects Tue Sep 3 14:46:27 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 00D3D37B401; Tue, 3 Sep 2002 14:46:16 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FD4037B400 for ; Tue, 3 Sep 2002 14:46:16 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FC9B43E6A for ; Tue, 3 Sep 2002 14:46:16 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g83LkGJU099662 for ; Tue, 3 Sep 2002 14:46:16 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g83LkFgt099659 for perforce@freebsd.org; Tue, 3 Sep 2002 14:46:15 -0700 (PDT) Date: Tue, 3 Sep 2002 14:46:15 -0700 (PDT) Message-Id: <200209032146.g83LkFgt099659@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 17009 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17009 Change 17009 by jhb@jhb_laptop on 2002/09/03 14:46:04 IFC @17008. Affected files ... .. //depot/projects/smpng/sys/conf/NOTES#22 integrate .. //depot/projects/smpng/sys/kern/imgact_elf.c#18 integrate .. //depot/projects/smpng/sys/kern/kern_descrip.c#35 integrate Differences ... ==== //depot/projects/smpng/sys/conf/NOTES#22 (text+ko) ==== @@ -1,8 +1,9 @@ +# $FreeBSD: src/sys/conf/NOTES,v 1.1071 2002/09/03 19:21:39 jhb Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # # Lines that begin with 'device', 'options', 'machine', 'ident', 'maxusers', -# 'makeoptions', 'hints' etc go into the kernel configuration that you +# 'makeoptions', 'hints', etc. go into the kernel configuration that you # run config(8) with. # # Lines that begin with 'hint.' are NOT for config(8), they go into your @@ -14,7 +15,25 @@ # This file contains machine independent kernel configuration notes. For # machine dependent notes, look in /sys//conf/NOTES. # -# $FreeBSD: src/sys/conf/NOTES,v 1.1070 2002/09/02 20:10:18 brooks Exp $ + +# +# NOTES conventions and style guide: +# +# Large block comments should begin and end with a line containing only a +# comment character. +# +# To describe a particular object, a block comment (if it exists) should +# come first. Next should come device, options, and hints lines in that +# order. All device and option lines must be described by a comment that +# doesn't just expand the device or option name. Use only a concise +# comment on the same line if possible. Very detailed descriptions of +# devices and subsystems belong in manpages. +# +# A space followed by a tab separates 'option' from an option name. Two +# spaces followed by a tab separate 'device' from a device name. Comments +# after an option or device should use one space after the comment character. +# To comment out a negative option that disables code and thus should not be +# enabled for LINT builds, precede 'option' with "#!". # # ==== //depot/projects/smpng/sys/kern/imgact_elf.c#18 (text+ko) ==== @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/imgact_elf.c,v 1.124 2002/09/02 17:27:30 dillon Exp $ + * $FreeBSD: src/sys/kern/imgact_elf.c,v 1.125 2002/09/03 21:18:17 peter Exp $ */ #include @@ -734,18 +734,20 @@ phdr[i].p_vaddr - seg_addr); /* - * Is this .text or .data? Use VM_PROT_WRITE - * to distinguish between the two for the purpose - * of limit checking and vmspace fields. + * Check whether the entry point is in this segment + * to determine whether to count is as text or data. + * XXX: this needs to be done better! */ - if (prot & VM_PROT_WRITE) { + if (hdr->e_entry >= phdr[i].p_vaddr && + hdr->e_entry < (phdr[i].p_vaddr + + phdr[i].p_memsz)) { + text_size = seg_size; + text_addr = seg_addr; + entry = (u_long)hdr->e_entry; + } else { data_size += seg_size; if (data_addr == 0) data_addr = seg_addr; - } else { - text_size += seg_size; - if (text_addr == 0) - text_addr = seg_addr; } /* @@ -761,13 +763,6 @@ error = ENOMEM; goto fail; } - - /* Does the entry point belong to this segment? */ - if (hdr->e_entry >= phdr[i].p_vaddr && - hdr->e_entry < (phdr[i].p_vaddr + - phdr[i].p_memsz)) { - entry = (u_long)hdr->e_entry; - } break; case PT_PHDR: /* Program header table info */ proghdr = phdr[i].p_vaddr; ==== //depot/projects/smpng/sys/kern/kern_descrip.c#35 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 - * $FreeBSD: src/sys/kern/kern_descrip.c,v 1.157 2002/09/02 22:24:14 iedowse Exp $ + * $FreeBSD: src/sys/kern/kern_descrip.c,v 1.158 2002/09/03 20:16:31 jhb Exp $ */ #include "opt_compat.h" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message