kernel: add support for init_array constructors
authorFrantisek Hrbata <fhrbata@redhat.com>
Mon, 14 Oct 2013 07:38:46 +0000 (18:08 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 17 Oct 2013 04:35:17 +0000 (15:05 +1030)
commiteb3057df732c304622aee77c450761746939a2dc
tree2890b26bb4827361e8ebc7835d2eaaac160179b8
parenteed380f3f5933edb8f4c055ba34ae7908ed38565
kernel: add support for init_array constructors

This adds the .init_array section as yet another section with constructors. This
is needed because gcc could add __gcov_init calls to .init_array or .ctors
section, depending on gcc (and binutils) version .

v2: - reuse mod->ctors for .init_array section for modules, because gcc uses
      .ctors or .init_array, but not both at the same time
v3: - fail to load if that does happen somehow.

Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
include/asm-generic/vmlinux.lds.h
kernel/module.c