Re: [RFC PATCH 1/6] kernel: call constructors

From: Peter Oberparleiter
Date: Tue May 06 2008 - 07:57:51 EST


Andrew Morton wrote:
> On Mon, 05 May 2008 17:24:04 +0200 Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx> wrote:
>
>> From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>
>> --- linux-2.6.26-rc1.orig/arch/powerpc/kernel/vmlinux.lds.S
>> +++ linux-2.6.26-rc1/arch/powerpc/kernel/vmlinux.lds.S
>> @@ -193,6 +193,9 @@ SECTIONS
>> *(.toc)
>> }
>> #endif
>> + .data.gcov : {
>> + CONSTRUCTORS
>> + }
>
> Why did powerpc (and only powerpc) need this touchup? It already includes
> asm-generic/vmlinux.lds.h?

asm-generic/vmlinux.lds.h defines CONSTRUCTORS but it needs to be
referenced in the actual linker script to become active. For some reason
unknown to me, CONSTRUCTORS shows up in all arch/*/vmlinux.lds.S scripts
except for powerpc (see also my other reply about the CONSTRUCTORS
section).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/