aboutsummaryrefslogtreecommitdiff
path: root/src/link.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/link.cpp')
-rw-r--r--src/link.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/link.cpp b/src/link.cpp
index 0cf55eec2d..d595580f9a 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -1615,6 +1615,11 @@ static void construct_linker_job_elf(LinkJob *lj) {
lj->args.append("-error-limit=0");
+ if (g->out_type == OutTypeExe) {
+ lj->args.append("-z");
+ lj->args.append("stack-size=16777216"); // default to 16 MiB
+ }
+
if (g->linker_script) {
lj->args.append("-T");
lj->args.append(g->linker_script);