Re: [2.6 patch] re-add -ffreestanding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 07, 2006 at 10:03:16AM -0400, Kyle Moffett wrote:
> On Sep 07, 2006, at 07:43:58, Russell King wrote:
> >On Thu, Sep 07, 2006 at 12:27:40PM +0200, Adrian Bunk wrote:
> >>And I'm getting bashed for sendind a patch to revert it "only" to  
> >>linux-kernel...
> >
> >As far as your argument that the kernel is not a hosted  
> >environment, that's debatable (as you're finding out).
> >
> >If we decide that we want the compiler to treat our source as if it  
> >were a hosted environment, and we provide sufficient implementation  
> >of a conforming nature of a hosted environment then that is our  
> >perogative to do so.  That is a decision that we are entirely free  
> >to make.  By doing so, we take on the responsibility to provide  
> >whatever is required for a hosted environment as opposed to the  
> >more limited functionality of a freestanding environment.
> 
> Ick, can anybody be persuaded to post actual effective code changes?   

I've already specified the changes on ARM, and suggested a fix for
them - but that got poo-poo'd.  I said:

On Wed, Aug 30, 2006 at 07:39:05PM +0100, Russell King wrote:
> Looking at the effect of -ffreestanding on ARM, it appears that on one
> hand, the overall image size is reduced by 0.016% but we end up with worse
> code - eg, strlen() of the same string in the same function evaluated
> multiple times vs once without -ffreestanding.
>
> The difference probably comes down to the lack of __attribute__((pure))
> on our string functions in linux/string.h.
>
> If we are going to go for -ffreestanding, we need to fix linux/string.h
> in that respect _first_.

So the effective code changes you ask for are: "multiple calls to
standard library functions that would not otherwise be made without
-ffreestanding".

Hence, for -ffreestanding to be acceptable to me, we need to fix
linux/string.h _first_.  That's really all I'm asking for but apparantly
that's too much to ask for.

It's not realistic to post the actual code changes because virtually every
line is different - due to differences in the register allocation caused
by the variations in code generation.  Hence, to compare it properly it's
a painstaking line by line read of each to understand what's going on and
manual compare.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux