Repository navigation
Commit eb3057d
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>1 parent eed380f commit eb3057d
2 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2708 | 2708 | | |
2709 | 2709 | | |
2710 | 2710 | | |
2711 | | - | |
| 2711 | + | |
2712 | 2712 | | |
2713 | 2713 | | |
2714 | 2714 | | |
| |||
2738 | 2738 | | |
2739 | 2739 | | |
2740 | 2740 | | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
2741 | 2753 | | |
2742 | 2754 | | |
2743 | 2755 | | |
| |||
2776 | 2788 | | |
2777 | 2789 | | |
2778 | 2790 | | |
| 2791 | + | |
| 2792 | + | |
2779 | 2793 | | |
2780 | 2794 | | |
2781 | 2795 | | |
| |||
3233 | 3247 | | |
3234 | 3248 | | |
3235 | 3249 | | |
3236 | | - | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
3237 | 3253 | | |
3238 | 3254 | | |
3239 | 3255 | | |
| |||
0 commit comments