[coldfire-gnu-discuss] Re: Stack size passed from Makefile

Maxim Kuvyrkov maxim at codesourcery.com
Mon May 12 16:35:54 UTC 2008


Daniel Jacobowitz wrote:
> On Mon, May 12, 2008 at 05:30:43PM +0200, Martin Voss wrote:
>> Hi Daniel,
>>
>> Hmm, we have been performing some user space stack profiling using the 4.2 version of Codesourcerys m68k-uclinux-gcc on the latest 2.4.x uClinux kernel.
>>
>> In some makefiles in userland they have changed the default stack size by using
>>
>> FLTFLAGS += -s 8192
>>
>> The above example is from the Makefile in the ftpd directory.
>>
>> But when we use flthdr to check the actual stack after the complete build has completed, it still reports 0x1000 as the stack size.
>>
>> We tried the m68k-uclinux-20061214, and this version seems to properly pass the -s to flthdr and change stack according to the Makefile.
>>
>> Is this something you could shed some light on?
> 
> I can't, but maybe someone else on the coldfire-gnu-discuss list can.
> Is PLTFLAGS passed to GCC, ld, or elf2flt?

This doesn't look like a toolchain issue.  In any case, we recommend to 
use GCC for both compilation and linking.  Note, you can still pass 
specific options to the linker using -Wl prefix.  E.g., to link a.o and 
b.o into prog using 8192 stack size one can use:

m68k-uclinux-gcc -o prog -Wl,-elf2flt="-s 8192" a.o b.o


--
Maxim Kuvyrkov
CodeSourcery



More information about the coldfire-gnu-discuss mailing list