Skip to content

[lld][elf] warn on missing .note.GNU-stack section #57009

@nickdesaulniers

Description

@nickdesaulniers

Since https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107, GNU ld (BFD) will warn when an ELF object is missing the .note.GNU-stack section.

Generally, we'd like code to not have an executable stack. Because some code could rely on that, we need to start migrating codebases to be built without executable stack.

We see this for the Linux kernel for asm sources. We plan to add -Wa,--noexecstack to KBUILD. See also:
https://lore.kernel.org/linux-block/CAKwvOdmD10yK0r1H-M2PcnZgy3M0aA9gdkY0BErDOQ+KpBRxVQ@mail.gmail.com/

Metadata

Metadata

Assignees

No one assigned

    Labels

    lld:ELFquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions