History

um: Enable CONFIG_CONSTRUCTORS

We do need to call the constructors for *modules*, and at least for KASAN in the future, we must call even the kernel constructors only later when the kernel has been initialized. Instead of relying on libc to call them, emit an empty section for libc and let the kernel's CONSTRUCTORS code do the rest of the job. Tested that it indeed doesn't work in modules, and does work after the fixes in both, with a few functions with __attribute__((constructor)) in both dynamic and static builds.

Johannes Berg committed 7 years ago

Commit 786b2381 parent 324f80c4 files · +2 −4Browse files

Showing the changes to init (1 of 4 files). Show all

Unified · Split

init/Kconfig+0−1
@@ -48,7 +48,6 @@ config CC_DISABLE_WARN_MAYBE_UNINITIALIZED · 47 unmodified lines
4848
4949 config CONSTRUCTORS
5050 bool
51− depends on !UML
5251
5352 config IRQ_WORK
5453 bool