diff options
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 6bdba10fef4a..55413e568f07 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -440,12 +440,21 @@ | |||
440 | INIT_TASK \ | 440 | INIT_TASK \ |
441 | } | 441 | } |
442 | 442 | ||
443 | #ifdef CONFIG_CONSTRUCTORS | ||
444 | #define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \ | ||
445 | *(.ctors) \ | ||
446 | VMLINUX_SYMBOL(__ctors_end) = .; | ||
447 | #else | ||
448 | #define KERNEL_CTORS() | ||
449 | #endif | ||
450 | |||
443 | /* init and exit section handling */ | 451 | /* init and exit section handling */ |
444 | #define INIT_DATA \ | 452 | #define INIT_DATA \ |
445 | *(.init.data) \ | 453 | *(.init.data) \ |
446 | DEV_DISCARD(init.data) \ | 454 | DEV_DISCARD(init.data) \ |
447 | CPU_DISCARD(init.data) \ | 455 | CPU_DISCARD(init.data) \ |
448 | MEM_DISCARD(init.data) \ | 456 | MEM_DISCARD(init.data) \ |
457 | KERNEL_CTORS() \ | ||
449 | *(.init.rodata) \ | 458 | *(.init.rodata) \ |
450 | DEV_DISCARD(init.rodata) \ | 459 | DEV_DISCARD(init.rodata) \ |
451 | CPU_DISCARD(init.rodata) \ | 460 | CPU_DISCARD(init.rodata) \ |