aboutsummaryrefslogtreecommitdiff
path: root/tccpe.c
diff options
context:
space:
mode:
authorgrischka <grischka>2011-07-11 18:47:16 +0200
committergrischka <grischka>2011-07-11 18:47:16 +0200
commit45184e01d80d0e01bc6d03a86e5aa4e706095e47 (patch)
tree37e47493403815894ba6868099ac0c0ff40dd051 /tccpe.c
parent7b573dc239a576da37f288c9ba39df5c0854b41d (diff)
downloadtinycc-45184e01d80d0e01bc6d03a86e5aa4e706095e47.tar.gz
tinycc-45184e01d80d0e01bc6d03a86e5aa4e706095e47.tar.bz2
win32: add -Wl,--stack=xxx switch
For example: $ tcc -Wl,--stack=4194309 which means 4 MB. Default is 1 MB.
Diffstat (limited to 'tccpe.c')
-rw-r--r--tccpe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tccpe.c b/tccpe.c
index de2575a..ed57c63 100644
--- a/tccpe.c
+++ b/tccpe.c
@@ -686,6 +686,8 @@ static int pe_write(struct pe_info *pe)
pe_header.filehdr.NumberOfSections = pe->sec_count;
pe_header.opthdr.SizeOfHeaders = pe->sizeofheaders;
pe_header.opthdr.ImageBase = pe->imagebase;
+ if (pe->s1->pe_stack_size)
+ pe_header.opthdr.SizeOfStackReserve = pe->s1->pe_stack_size;
if (PE_DLL == pe->type)
pe_header.filehdr.Characteristics = CHARACTERISTICS_DLL;
else if (PE_GUI != pe->type)