Hi,

It seems -Wl,--stack=0x8000000 works:
SizeOfStackReserve      0000000008000000
SizeOfStackCommit       0000000000001000
SizeOfHeapReserve       0000000000100000
SizeOfHeapCommit        0000000000001000

The question is more how this is used, do we really get a 2Mb stack. 

Johnny

> I am not sure whether the compiler/linker influence this.
> 
> Or if they do, then maybe the magic numbers in the exe files cause it,
> and these can usually be influenced.
> 
> I'm referring to the stuff objdump -x prints out at the beginning, see
> below for an ARM example.
> 
>       Danny
> 
> f.exe:     file format pei-arm-wince-little
> f.exe
> architecture: armv4, flags 0x0000013a:
> EXEC_P, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, D_PAGED
> start address 0x00011000
> 
> Characteristics 0x4507
>         relocations stripped
>         executable
>         line numbers stripped
>         32 bit words
> 
> Time/Date               Sun May 24 15:44:58 2009
> Magic                   010b    (PE32)
> MajorLinkerVersion      2
> MinorLinkerVersion      56
> SizeOfCode              00001600
> SizeOfInitializedData   00000600
> SizeOfUninitializedData 00000200
> AddressOfEntryPoint     00001000
> BaseOfCode              00001000
> BaseOfData              00003000
> ImageBase               00010000
> SectionAlignment        00001000
> FileAlignment           00000200
> MajorOSystemVersion     4
> MinorOSystemVersion     0
> MajorImageVersion       1
> MinorImageVersion       0
> MajorSubsystemVersion   3
> MinorSubsystemVersion   0
> Win32Version            00000000
> SizeOfImage             00015000
> SizeOfHeaders           00000400
> CheckSum                000147be
> Subsystem               00000009        (Wince CUI)
> DllCharacteristics      00000000
> SizeOfStackReserve      00200000
> SizeOfStackCommit       00001000
> SizeOfHeapReserve       00100000
> SizeOfHeapCommit        00001000
> LoaderFlags             00000000
> NumberOfRvaAndSizes     00000010
> 
> 
> On Mon, 2009-05-25 at 12:57 +0200, Johnny Willemsen wrote:
> > Hi
> >
> > What is the default stack size for the main thread when I compile
> with CEGCC
> > x86? With MSVC I think it is 1MB. The reason I ask is that I have
> some tests
> > that seem to end because of a stack overflow. Danny, for example
> > tests/Bug_1890_Regression_Test.cpp.
> >
> > We allocate a fairly large object on the stack. I have tried
> > -Wl,--stack=0x8000000 (see below) but that doesn't resolve the crash.
> When I
> > allocate the object from the heap it does work without problems.
> >
> > Johnny
> >
> > i386-mingw32ce-g++ -Wpointer-arith -mthreads  -Wno-attributes -Wall -
> W -O3
> > -g -pipe    -pipe -DACE_HAS_CEGCC  -D_WIN32_WCE=0x600 -DUNICODE -
> D_UNICODE
> > -D_WINDOWS -DCEVER -DWIN32 -D_WINSOCKAPI_ -
> DACE_HAS_CUSTOM_EXPORT_MACROS=0
> > -I/home/build/ACE/cegcc/ACE_wrappers -DACE_HAS_EXCEPTIONS -
> DACE_NO_INLINE
> > -I.. -DACE_AS_STATIC_LIBS  -c  -o .obj/Bug_1890_Regression_Test.o
> > Bug_1890_Regression_Test.cpp
> > i386-mingw32ce-g++ -Wpointer-arith -mthreads  -Wno-attributes -Wall -
> W -O3
> > -g -pipe    -pipe -DACE_HAS_CEGCC  -D_WIN32_WCE=0x600 -DUNICODE -
> D_UNICODE
> > -D_WINDOWS -DCEVER -DWIN32 -D_WINSOCKAPI_ -
> DACE_HAS_CUSTOM_EXPORT_MACROS=0
> > -I/home/build/ACE/cegcc/ACE_wrappers -DACE_HAS_EXCEPTIONS -
> DACE_NO_INLINE
> > -I.. -DACE_AS_STATIC_LIBS  -Wl,--stack=0x8000000 -Wl,--enable-auto-
> import
> > -L/home/build/ACE/cegcc/ACE_wrappers/lib -static -L. -L../lib -o
> > Bug_1890_Regression_Test.exe .obj/Main.o
> .obj/Bug_1890_Regression_Test.o
> > -lTest_Output -lACE -lcoredll -lmingw32 -lmingwex -lws2 -lsupc++ -
> liphlpapi
> >
> >
> >
> > ---------------------------------------------------------------------
> ---------
> > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> > is a gathering of tech-side developers & brand creativity
> professionals. Meet
> > the minds behind Google Creative Lab, Visual Complexity, Processing,
> &
> > iPhoneDevCamp asthey present alongside digital heavyweights like
> Barbarian
> > Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> > _______________________________________________
> > Cegcc-devel mailing list
> > Cegcc-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> >
> --
> Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to