uclibc on coldfire 5475 eval board

Christof Girgenrath chrigi at nateurope.com
Wed Sep 27 10:39:06 UTC 2006


Hello,

sorry for contacting you directly, but I do not know how to reply
to your posting directly via the uclibc mailing list site (I could
not find a 'reply' button and the mailto: link does not work with
firefox and konqueror). What did I wrong ???

So, thanks for your answer. I tried to link my test application
statically but it fails:

test application:
#include <stdio.h>

int main(void)
{
	printf("HELLO INITTEST\n");
	return(0);
}

Makefile:
# paths
INC_PATH = ../../include
LIB_PATH = ../../../lib

# compiler flags
CFLAGS =  -mcfv4e -I$(INC_PATH) -Wall
LDFLAGS = -L$(LIB_PATH)

.c.o:
	$(CC) $(CFLAGS) -c $<

inittest: inittest.o
	$(CC) $(LDFLAGS) inittest.o -o $@

inittest_static: inittest.o
	$(LD) $(LDFLAGS) -o $@ -static \
		inittest.o

results in:

m68k-uclinux-ld.real: warning: cannot find entry symbol _start;
   defaulting to 80000094
inittest.o: In function `main':
inittest.c:(.text+0xc): undefined reference to `puts'
make: *** [inittest_static] Error 1

and:

inittest_static: inittest.o
	$(LD) $(LDFLAGS) -o $@ \
		$(LIB_PATH)/crt1.o $(LIB_PATH)/crti.o -lc \
		inittest.o

results in:
m68k-uclinux-ld.real: warning: ld-uClibc.so.0, needed by ../../../lib/libc.so.0, 
not found (try using -rpath or -rpath-link)
../../../lib/libc.so.0: undefined reference to `_dl_app_init_array'
../../../lib/libc.so.0: undefined reference to `_dl_app_fini_array'
make: *** [inittest_static] Error 1

but:
 > ls ../../../lib/ld-uClibc*
../../../lib/ld-uClibc-0.9.29.so  ../../../lib/ld-uClibc.so.0
../../../lib/ld-uClibc.so

 > Are you sure that the kernel isn't starting up init, but errors out
 > early before any message comes out?  Try statically linking your init so

For sure the kernel cannot start the init process correctly: The kernel
panic message is printed if run_init_process("/sbin/init") and friends
fail. Therefore I passed the test application as init process to the kernel
command line but the effect is the same. Howver, when using the Freescale
delivered glibc and compiling the application for glibc usage the application
comes up.

I think there is a basic problem with my uClibc.


Thank you

Christof




More information about the uClibc mailing list