On Wed, 2005-11-23 at 13:24 -0800, David S. Miller wrote:
> From: Arjan van de Ven <[email protected]>
> Date: Wed, 23 Nov 2005 10:11:24 +0100
>
> > it can.. but only if we start using -ffunction-sections in the CFLAGS
> > (or make all of these functions static I suppose and reenable
> > -funit-at-a-time, which can be done for gcc 4.x only)
>
> I actually just scanned the tree, and outside of files that
> only get built on CONFIG_SMP (namely, arch/${ARCH}/kernel/smp{,boot}.c)
> the IPI functions were %99 marked static already and the remaining
> %1 should be marked static. The cases in that %1 group are:
static is good anyway :)
>
> arch/mips/sibyte/sb1250/prom.c:prom_cpu0_exit()
> arch/powerpc/kernel/machine_kexec_64.c:kexec_smp_down()
>
> And as stated, those two can just be marked static right now.
>
> So we could very easily remove the CONFIG_SMP ifdefs, but the
> -funit-at-a-time requirement to get gcc to not emit unused static
> functions is very unfortunate.
I'm no gcc expert but afaik this really needs unit-at-a-time. (someone
who knows more about gcc please correct me if I'm wrong).
On the good news side:
-f-unit-at-a-time can be enabled for gcc 4.x; the stack bug that caused
it to be disabled is fixed in gcc 4.x
and .. -ffunction-sections may well be a good thing anyway; that works
even for non-statics.
(but iirc it needs some linker script changes because sections change
name)
-
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]