bin/160275: [patch] dtrace(1): dtrace -lv causes " unknown
function" warnings
Paul Ambrose
ambrosehua at gmail.com
Mon Oct 17 14:10:10 UTC 2011
The following reply was made to PR bin/160275; it has been noted by GNATS.
From: Paul Ambrose <ambrosehua at gmail.com>
To: bug-followup at FreeBSD.org, ambrosehua at 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
More information about the freebsd-bugs
mailing list