• Johannes Berg's avatar
    um: Enable CONFIG_CONSTRUCTORS · 786b2384
    Johannes Berg authored
    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.
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    786b2384
common.lds.S 1.67 KB