Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Adding stack canary support for safe large stack usages. #5

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cdt-llvm
Submodule cdt-llvm updated 1 files
+1 −1 tools/lld
7 changes: 7 additions & 0 deletions tools/include/compiler_options.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ static llvm::cl::OptionCategory EosioLdToolCategory("ld options");
#endif

/// begin ld options
static cl::opt<bool> stack_canary_opt(
"stack-canary",
cl::desc("Stack canary for non stack first layouts"),
cl::cat(LD_CAT));
static cl::opt<std::string> abi_version_opt(
"abi-version",
cl::desc("Which ABI version to generate"),
Expand Down Expand Up @@ -786,6 +790,9 @@ static Options CreateOptions(bool add_defaults=true) {
#endif
if (!fnative_opt) {
#ifdef ONLY_LD
if (stack_canary_opt) {
ldopts.emplace_back("--stack-canary");
}
if (!fno_stack_first_opt) {
ldopts.emplace_back("-stack-first");
}
Expand Down