win32: add -Wl,--stack=xxx switch

For example:

    $ tcc -Wl,--stack=4194309

which means 4 MB.  Default is 1 MB.
This commit is contained in:
grischka
2011-07-11 18:47:16 +02:00
parent 7b573dc239
commit 45184e01d8
3 changed files with 7 additions and 6 deletions

View File

@ -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)