[uClibc]uClibc toolchains for ARM?

Steve Tsai startec at ms11.hinet.net
Fri Dec 13 06:16:23 UTC 2002


I download makefile for toolchains and modify it for my arm940t board 
using uClinux.  I just need type make and  all the toolchains are built 
automatically. After that I download test.cpp and test2.cpp from test 
directory and built it, but these two programs can not run on my board. 
When I run test program, I got the following errors,
        BINFMT_FLAT: reloc outside program 0x33323130 (0 - 
0x1b8404/0x31398), killing t!
        BINFMT_FLAT: reloc outside program 0x33323130 (0 - 
0x1b8404/0x31398), killing t!
        pid 27: failed 11

When I run test2 program, I got the following message
        fault-common.c 243
        pid 28: failed 7

For testing the toolchains I write a test program as the following and 
It works on my board. But, If I add 'cout << "test cout\n";' into the 
file, I got BINFMT_FLAT error as the test.cpp from uClibc's site.  If I 
use "new" operator, I will get signal 4 error and program was terminated 
before call to the main() function. It seems that I can not link the C++ 
library.  I can use the toolchains to compiler and link program to run 
on arm940t board, but I can not use it's C++ library. I test both 
GCC2.95 and GCC3.2, they have the same problem. From the list, I know 
someone can use the C++ library, maybe they can share their experience. 
I'd like to know how to build the C++ program to run on arm board or 
tell me how to trace and fix the problem. Thanks.

Steve Tsai


#include <stdio.h>
//#include <iostream.h>
class hello {
    public:
        hello();
        void print();
};

hello::hello()
{
}

void hello::print()
{
    printf("test\n");
//    cout << "test cout\n";
}

int main(int argc, char *argv[])
{
    hello h;
//hello *y = new hello();
    h.print();
    return 0;
}






More information about the uClibc mailing list