From owner-freebsd-stable@FreeBSD.ORG Sat Aug 23 06:42:15 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6203516A4BF for ; Sat, 23 Aug 2003 06:42:15 -0700 (PDT) Received: from mout2.freenet.de (mout2.freenet.de [194.97.50.155]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB2D343FB1 for ; Sat, 23 Aug 2003 06:42:13 -0700 (PDT) (envelope-from ino-qc@spotteswoode.de.eu.org) Received: from [194.97.50.136] (helo=mx3.freenet.de) by mout2.freenet.de with asmtp (Exim 4.21) id 19qYei-00060B-74 for freebsd-stable@freebsd.org; Sat, 23 Aug 2003 15:42:12 +0200 Received: from pd90559e0.dip.t-dialin.net ([217.5.89.224] helo=spotteswoode.dnsalias.org) by mx3.freenet.de with asmtp (ID inode@freenet.de) (Exim 4.21 #2) id 19qYeh-0003tp-Ol for freebsd-stable@freebsd.org; Sat, 23 Aug 2003 15:42:11 +0200 Received: (qmail 26131 invoked by uid 0); 23 Aug 2003 13:42:10 -0000 Date: 23 Aug 2003 15:42:09 +0200 Message-ID: From: "Clemens Fischer" To: "Luoqi Chen" In-Reply-To: (Luoqi Chen's message of "Fri, 22 Aug 2003 11:33:44 -0700") References: User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-stable@freebsd.org Subject: Re: kernel: locore.s doesn't assemble (fillkpt, $PAGE_SHIFT, $PTESHIFT) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 13:42:15 -0000 * Luoqi Chen: >> since august 8th, 2003 the kernel on my i386 pentiumIII won't >> compile. the problem arises in locore.s with the definition of the >> constants $PAGE_SHIFT and $PTESHIFT used in `shr' and `shl' >> instructions within the macros `fillkpt' and `fillkptphys'. >> > Did you do a make depend beforehand? The assym.s file is generated > during the make depend phase. yes, i go by the book. but while tracking RELENG_4 i use "make buildworld && make buildkernel KERNCONF=n1 && make installkernel KERNCONF=n1", just as outlined in usr/src/Makefile. i'll check assym.s right after "make depend", that's a good idea! /sys/compile/n1 1 p2 # cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include -I../../contrib/dev/acpica -I../../contrib/ipfilter -D_KERNEL -include opt_global.h -mpreferred-stack-boundary=2 ../../i386/i386/genassym.c 0 p2 # lt|tail 1334981 -rw-r--r-- 1 root wheel - 0 Aug 23 14:57 assym.s 1334281 -rw-r--r-- 1 root wheel - 14202 Aug 23 14:59 genassym.o 1334458 drwxr-xr-x 2 root wheel - 10752 Aug 23 14:59 ./ 0 p2 # sh ../../kern/genassym.sh genassym.o > assym.s 0 p2 # lt|tail 1334281 -rw-r--r-- 1 root wheel - 14202 Aug 23 14:59 genassym.o 1334458 drwxr-xr-x 2 root wheel - 10752 Aug 23 14:59 ./ 1334981 -rw-r--r-- 1 root wheel - 0 Aug 23 14:59 assym.s but i found something very interesting: basically genassym.sh is a boune-shell script doing "nm | awk 'awk-script'". genassym.o is that object file, and it sure contains all the symbols needed. so i ran this line manually, and the result was correct, all the symbols needed were either on stdout or in assym.s! my question is this: why does sys/kern/genassym.sh have this funny redirection (`3>/dev/stdout >&3 3>&-') at the end? why not only write `> "$outfile"'? i tried this version, and it works perfectly fine. the original line highly depends on when the shell does redirection. i don't understand why fd-3 is used at all, why it is closed, redirected from stdout and redirected to the file which can be specified with the `-o' option to genassym.sh. the simple version would do this equaly well, without complications. i have to admit, though, that i don't understand why nobody else is experiencing this problem. i have a build running currently, but with creating assym.s manually as a workaround i think i'll be able to install world and kernel fine. clemens