On Fri, 20 Apr 2007 14:51:47 -0400, Praveen Chandrasekharaiah
<[EMAIL PROTECTED]> wrote:
Hi,
I am trying to run a simple C++ application on uClinux 2.6.16 on a
M5272C3 board. The program is:
*#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
cout << "Hello this is my First uClinux C++ Application\n" << endl;
return 0;
}
*
The following command was used to cross compile the above program:
*m68k-elf-g++ -Wl,-elf2flt=-z -m5307 -msep-data -o hello hello.cpp
-lstdc++ -lc -lgcc*
On executing the program i got the following error:
*Support for ZFLAT executable is not enabled
Shell invoked to run file: ./hello
Command:bFLT
bFLT: Bad command or file name*
So i enabled the ZFLAT flag in */linux-2.6.x/.config:
CONFIG_BINFMT_ZFLAT=y*
Now on executing i get the following error:
*BINFMT_FLAT: reloc outside program 0xe70b2385 (0 - 0x55f54/0x4e1c0),
killing hello!*
you need to increase stack size (default is 4k I believe)using FLTFLAG =
-s NNNN to build your binary
or using flthdr -s NNNN to change the stack size,. where NNNN is the new
stack size
ex. flthdr -s 40000 hello (40000 bytes for the stack)
--
David Wu
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev