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

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

> I'd like to add back the strlen() routine to libkern.  Basically, the
> linker won't pull it in if the kernel is compiled with optimization
> since it won't be needed, but it's available if any routines aren't
> optimized.
> 
> The reason I think this should be brought in is that the current
> behavior of in-lining strlen() is extremely non-intuitive and very GCC
> specific.  At least if we add back the strlen() code we aren't depending
> on gcc optimizing away the calls.
> 
> 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.

How many times is strlen used, and could it maybe be recoded instead?


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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