Re: [uCsimm] fork () / vfork ()

From: Tom Walsh (
Date: Wed Apr 18 2001 - 12:55:46 EDT

Ian Leonard wrote:
> The linker gives lots of messages of which the following is an example.
> I assume this is the 32k limit?

Yes and no, what you are running into is a problem in the uClibc. There
is a function called 'cleanup()' that is called by the library and as
the library has been compiled as PIC16, it is not able to reach across
32K of code to reach the crt0.o definition of the function. This due to
way the linking is done: crt0.o + your_program + the_library. I
recently ran into this myself just recently, my solution was to remove
the cleanup() funtion from the crt0.s and move the funtion into the
uClibc sources and rebuild the library. The cleanup() function is a nop
and I believe that it is used for C++ (AFAIK, the PIC compiler is not
able to do C++ ?). Look in the uClibc sources at a file, I think, is
called atexit.c, this is where the call is made. I added a file called
cleanup.c to define this function.

I have not yet had time to organize this new rpm into my rpm files
available for download. I do have the rpm / srpms + spec file if you
want them. This new uClibc has been designed to run only when using the
PIC32 compiler.

Erwin Authried modified those compiler sources so that the compiler
would make very large text sections possible, this is known as the PIC32
compiler. AFAIK, Lineo ( still does not make the PIC32
compiler available for download, or ship it with the uCsimm products.
You will have to fetch it yourself.

I have an RPM of the PIC32 compiler on my website:
''. To
install: see the README.pic32 file.

The original sources for the PIC32 compiler are from Erwin Authried's
site: ''.



Tom Walsh - WN3L - Embedded Systems Consultant
'', ''
"Windows? No thanks, I have work to do..."
This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST