Skip to content

Orphan section warnings from .text.asan.module_{c,d}tor #1432

@nathanchance

Description

@nathanchance

After llvm/llvm-project@7b78956, enabling at least CONFIG_KASAN results in tons of orphan section warnings:

$ make -skj"$(nproc)" LLVM=1 LLVM_IAS=1 distclean defconfig

$ scripts/config -e KASAN

$ make -skj"$(nproc)" LLVM=1 LLVM_IAS=1 olddefconfig all
...
ld.lld: warning: arch/x86/kernel/ebda.o:(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor'
ld.lld: warning: arch/x86/kernel/platform-quirks.o:(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor'
ld.lld: warning: init/built-in.a(main.o):(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor'
ld.lld: warning: init/built-in.a(main.o):(.text.asan.module_dtor) is being placed in '.text.asan.module_dtor'
ld.lld: warning: init/built-in.a(version.o):(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor'
ld.lld: warning: init/built-in.a(version.o):(.text.asan.module_dtor) is being placed in '.text.asan.module_dtor'
ld.lld: warning: init/built-in.a(do_mounts.o):(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor'
ld.lld: warning: init/built-in.a(do_mounts.o):(.text.asan.module_dtor) is being placed in '.text.asan.module_dtor'
...

Should these sections be kept or should we discard them? It seems that according to the commit message, prior to this commit, they were not being kept? If we should keep them, should they just go in TEXT_TEXT within include/asm-generic/vmlinux.lds.h?

cc @MaskRay @kees

Metadata

Metadata

Assignees

No one assigned

    Labels

    Orphan sectionAn linker orphan section warning[BUG] linuxA bug that should be fixed in the mainline kernel.[BUG] llvm (main)A bug in an unreleased version of LLVM (this label is appropriate for regressions)[FIXED][LINUX] 5.14This bug was fixed in Linux 5.14

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions