From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 17 14:10:10 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3656E1065670 for ; Mon, 17 Oct 2011 14:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06B918FC13 for ; Mon, 17 Oct 2011 14:10:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9HEA9Dl069998 for ; Mon, 17 Oct 2011 14:10:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9HEA9D1069997; Mon, 17 Oct 2011 14:10:09 GMT (envelope-from gnats) Date: Mon, 17 Oct 2011 14:10:09 GMT Message-Id: <201110171410.p9HEA9D1069997@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Paul Ambrose Cc: Subject: Re: bin/160275: [patch] dtrace(1): dtrace -lv causes " unknown function" warnings X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Ambrose List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 14:10:10 -0000 The following reply was made to PR bin/160275; it has been noted by GNATS. From: Paul Ambrose To: bug-followup@FreeBSD.org, ambrosehua@gmail.com Cc: Subject: Re: bin/160275: [patch] dtrace(1): dtrace -lv causes "unknown function" warnings Date: Mon, 17 Oct 2011 22:03:55 +0800 I think I get it. 1. The page fault error is due to the santiy check error for ctf section of kernel module built without WITH_CTF=1, and it is fixed by r226082 2 The first part of the "unknown function" warning came from the in_proto.c and if_ethersubr.c built without ctfconvert post-processing. When config(8) generates make rules source files with compile-with command in src/sys/conf/files, it DOES NOT append ${NORMAL_CTFCONVERT} to the rules. Here is the fix diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 2372839..25a85de 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -767,6 +767,14 @@ do_rules(FILE *f) ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; } + //handle CTF issule with NORMAL_C and NORMAL_C_NOERROR + else if (!strncmp(compilewith, "${NORMAL_C", sizeof("${NORMAL_C"))) { + snprintf(cmd, sizeof(cmd), + "%s\n\t@${NORMAL_CTFCONVERT}", + compilewith); + compilewith = cmd; + } 3 The second part of "unknown function" came from the clang compiler. When building kernel with clang, some modules failed to be post-processed by ctfconvert and ctfmerge tools . If you build kernel with gcc, this warning is gone. 4 The last part of warning came from the "x11/nvidia-driver". If you build it without WITH_CTF=1, you would trigger the page fault error until r226082. If you build it with DEBUG_FLAGS="-g" and WITH_CTF=1, you may get less warning from nvidia.ko, the remaining warning came from the nv_freebsd.o object released by nvidia, I think this object is NOT built "-g", so even though you add WITH_CTF=1, you can not get correct ctf section. So, I think my work is done with this PR