Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 1995 11:36:28 -0700
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        Terry Lambert <terry@lambert.org>
Cc:        nate@rocky.sri.MT.net (Nate Williams), current@FreeBSD.org
Subject:   Re: Mis-feature in -current
Message-ID:  <199512191836.LAA27072@rocky.sri.MT.net>
In-Reply-To: <199512191828.LAA14949@phaeton.artisoft.com>
References:  <199512190506.WAA25662@rocky.sri.MT.net> <199512191828.LAA14949@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512191836.LAA27072>