Re: [PATCH 1/7] kernel: call constructors

From: Peter Oberparleiter
Date: Tue May 20 2008 - 02:45:27 EST


Andrew Morton wrote:
> On Mon, 19 May 2008 10:43:14 +0200
> Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx> wrote:
>
>> From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>
>>
>> Call constructors during kernel init and module load. Required by the
>> gcov profiling infrastructure: gcc's profiling code uses constructors
>> to register profiling data structures.
>>
>
> What happens with architectures which do not use
> include/asm-generic/vmlinux.lds.h? A quicky grep points at

In that case, no constructors would be called and as a result the gcov
debugfs directory would be empty. This should be easily fixable as the
case arises though. I've re-checked arch/*/vmlinux* and all of those
linker scripts seem to include asm-generic/vmlinux.lds.h at most via
one indirection.

> arch/m68k/kernel/vmlinux.lds.S

Includes asm-generic/vmlinux.lds.h either via vmlinux-sun3.lds or
vmlinux-std.lds.

> arch/sh/kernel/vmlinux.lds.S

Includes asm-generic/vmlinux.lds.h either via vmlinux_32.lds.S or
vmlinux_64.lds.S.

> arch/um/kernel/vmlinux.lds.S

Includes asm-generic/vmlinux.lds.h either via uml.lds.S or dyn.lds.S.


Regards,
Peter
--
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/