From owner-freebsd-current Tue Dec 19 10:34:20 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA27198 for current-outgoing; Tue, 19 Dec 1995 10:34:20 -0800 (PST) Received: from rocky.sri.MT.net (rocky.sri.MT.net [204.182.243.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA27178 for ; Tue, 19 Dec 1995 10:34:10 -0800 (PST) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id LAA27072; Tue, 19 Dec 1995 11:36:28 -0700 Date: Tue, 19 Dec 1995 11:36:28 -0700 From: Nate Williams Message-Id: <199512191836.LAA27072@rocky.sri.MT.net> To: Terry Lambert Cc: nate@rocky.sri.MT.net (Nate Williams), current@FreeBSD.org Subject: Re: Mis-feature in -current In-Reply-To: <199512191828.LAA14949@phaeton.artisoft.com> References: <199512190506.WAA25662@rocky.sri.MT.net> <199512191828.LAA14949@phaeton.artisoft.com> Sender: owner-current@FreeBSD.org Precedence: bulk Terry Lambert writes: > > This one was a strange one, but I finally figured it out. I'm trying to > > build kernels which contain all of the necessary 'debug' symbols in > > them, so I'm not compiling the code with '-O'. > > > > However, I've noticed that if you don't compile the code with '-O', gcc > > no longer optimizes out the calls to strlen. What this means is that > > the kernel will no longer link if you compile any modules which uses > > strlen(). > > Can you manually add back in the inlining/intrinsicing? This would be > the easiest option. Not w/out hacking the gcc sources, making our tree even more dependant on the compiler. > > Any disagreements before I add back strlen to libkern? > > Actually (not that it would seem to matter), I'm anti-string-manipulation > in kernel code. The only places this is violated currently is in the > path parsing code and the NFS argument code. We all know about that, but I'm talking about the code that exists in -current today, not in FreeBSD 10.1. > How many times is strlen used, and could it maybe be recoded instead? Why would it need to be recoded? As it stands currently (and this will not change for some time), the code in libkern/strlen.c is completely adequate to do the job. Nate