Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append noexecstack to linker flags instead of assembler flags #2161

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

parona-source
Copy link

  • Better compatibility with LLVM toolchain where clang -c doesn't support the flag, but the linker does. LLD already defaults to noexecstack, but adding it in the linker phase will avoid errors about unsupported options.
clang -c --noexecstack  -o ext/x64-salsa2012-asm/salsa2012.o ext/x64-salsa2012-asm/salsa2012.s
1 warning generated.
clang: error: unsupported option '--noexecstack'
make: *** [<builtin>: ext/x64-salsa2012-asm/salsa2012.o] Error 1
 $ scanelf -e zerotier-one
 TYPE   STK/REL/PTL FILE 
ET_DYN RW- R-- RW- zerotier-one

llvm/llvm-project#57009 (comment)

* Better compatibility with LLVM toolchain where clang -c doesn't
  support the flag, but the linker does. LLD already defaults to
  noexecstack, but adding it in the linker phase will avoid errors about
  unsupported options.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant