We currently have a platform which uses an M5233 nommu Coldfire with
uClinux using a 2.6.17 kernel with uClibc 0.9.27, bFLT executables and no
shared library support. The compiler set we are using is the 4.1.1
compiler set as distributed from the uclinux.org website and it works well
for programming in C. Recently we have a need to program in C++ so I have
been trying to get the g++ compiler to generate a valid executable. The
compile works fine but when I run, I always get :
BINFMT_FLAT: reloc outside program 0xff9b0d01 (0 - 0x84f54/0x51060),
killing helloworld!
and a SIGSEGV. The application is simply hello world as follows:
#include <iostream>
int main (int argc, char **argv)
{
std::cout << "Hello World\n";
return 0;
}
The compile and link step are as follows:
m68k-elf-g++ -m5307 -DCONFIG_COLDFIRE -I../../include -g -O0 -pipe
-fno-common -fno-builtin -Wall -Wno-strict-aliasing -DEMBED -msep-data
-Dlinux -D__linux__ -Dunix -D__uClinux__ -c -o helloworld.o
helloworld.C
m68k-elf-g++ -m5307 -DCONFIG_COLDFIRE -I../../include -g -O0 -pipe
-fno-common -fno-builtin -Wall -Wno-strict-aliasing -DEMBED -msep-data
-Dlinux -D__linux__ -Dunix -D__uClinux__ -L../../lib/morey
-Wl,--fatal-warnings -Wl,-elf2flt -Wl,-move-rodata -msep-data -lstdc++ -o
helloworld helloworld.o
It seems that no matter what compile and link options I use the result is
the same. I have also tried increasing the stack size to as large as 256K
with no change . I searched around and found many methods that people
have used to solve this problem and have tried pretty much every one but
nothing seems to change the result. Is there possibly an issue in the
elf2flt conversion that is causing this issue?
Any ideas on how to eliminate this issue would be appreciated.
John Moore
The Morey Corporation
100 Morey Drive
Woodridge, IL 60517-8135
Email: jmo...@moreycorp.com
This e-mail, including attachments, may contain information that is
confidential and/or proprietary, and may only be used by the person to
whom this email is addressed. If the recipient of this e-mail is not the
intended recipient or an authorized agent, the reader is hereby notified
that any dissemination, distribution, or copying of this e-mail is
prohibited. If this e-mail has been delivered to you in error, please
notify the sender by replying to this message and deleting this e-mail
immediately.
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev