Dave Dons
2004-11-26 16:30:41 UTC
GCC 3.3.4 setting Stack and Heap
Help appreciated setting stack (and heap) in GCC in Linux:
gcc (GCC) 3.2.3 (mingw special 20030504-1) has no problems with:
g++ -Wl,--heap,1048576,--stack,10485760 axx1.cpp utils.cpp -Wall -Os
-o axxngcc
g++ -Wl,--heap=1048576,--stack=10485760 axx1.cpp utils.cpp -Wall -Os
-o axxgcc
g++ -Wl,--heap=0x00100000,--stack=0x00A00000 axx1.cpp -Wall -Os -o
axxgcc
or
g++ -Wl,--stack -Wl,10485760 axx1.cpp utils.cpp -Wall -Os -o axxgcc
However,
gcc (GCC) 3.3.4 (Debian 1:3.3.4-9) in ClusterKnoppix 3.6
g++ -Wl,--stack -Wl,10485760 axx1.cpp utils.cpp -Wall -Os -o axxgcc
and all the other variations above give similar to:
/usr/bin/ld: unrecognized option '--stack'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
I suspect that this is not an issue specific to Knoppix or Debian.
Searching the web yields the results I have tried, which all work in
3.2.3 (mingw)
... and all consistently fail in Linux.
Suggestions?
Directions to definitive documentation?
Many thanks,
Dave D
Help appreciated setting stack (and heap) in GCC in Linux:
gcc (GCC) 3.2.3 (mingw special 20030504-1) has no problems with:
g++ -Wl,--heap,1048576,--stack,10485760 axx1.cpp utils.cpp -Wall -Os
-o axxngcc
g++ -Wl,--heap=1048576,--stack=10485760 axx1.cpp utils.cpp -Wall -Os
-o axxgcc
g++ -Wl,--heap=0x00100000,--stack=0x00A00000 axx1.cpp -Wall -Os -o
axxgcc
or
g++ -Wl,--stack -Wl,10485760 axx1.cpp utils.cpp -Wall -Os -o axxgcc
However,
gcc (GCC) 3.3.4 (Debian 1:3.3.4-9) in ClusterKnoppix 3.6
g++ -Wl,--stack -Wl,10485760 axx1.cpp utils.cpp -Wall -Os -o axxgcc
and all the other variations above give similar to:
/usr/bin/ld: unrecognized option '--stack'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
I suspect that this is not an issue specific to Knoppix or Debian.
Searching the web yields the results I have tried, which all work in
3.2.3 (mingw)
... and all consistently fail in Linux.
Suggestions?
Directions to definitive documentation?
Many thanks,
Dave D