[uClibc] [PATCH] Compile __exec_alloc and __exec_free if the target has no MMU

Patrick Aussems paussems at dti-be.com
Mon Jan 12 11:00:12 UTC 2004


Hi,

After upgrading my toolchain to use 0.9.26, I got the following errors 
at link time:

...
arm-elf-gcc -elf2flt -o tinylogin tinylogin.o applets.o usage.o 
addgroup.o adduser.o deluser.o getty.o login.o passwd.o sha1.o shadow.o 
su.o sulogin.o vlock.o libpwd.a libbb.a -lcrypt
tinylogin.elf2flt(.text+0x10558): In function `execl':
: undefined reference to `__exec_alloc'
tinylogin.elf2flt(.text+0x105a4): In function `execl':
: undefined reference to `__exec_free'
tinylogin.elf2flt(.text+0x10604): In function `execlp':
: undefined reference to `__exec_alloc'
tinylogin.elf2flt(.text+0x10648): In function `execlp':
: undefined reference to `__exec_free'
tinylogin.elf2flt(.text+0x10700): In function `execvp':
: undefined reference to `__exec_alloc'
tinylogin.elf2flt(.text+0x10740): In function `execvp':
: undefined reference to `__exec_free'
tinylogin.elf2flt(.text+0x107a4): In function `execvp':
: undefined reference to `__exec_alloc'
tinylogin.elf2flt(.text+0x1087c): In function `execvp':
: undefined reference to `__exec_free'
collect2: ld returned 1 exit status
make[1]: *** [tinylogin] Error 1

After a short investigation, it appears that when HAS_MMU = no, the 
EXEC_ALLOC is a define to __exec_alloc function. This function will only 
be compiled if exec.c is compiled with -DL___exec_alloc. In the Makefile 
this is done by appending __exec_alloc.o to MOBJ1. Unfortunately there 
is an error in the Makefile: __exec_alloc.o is only appended if HAS_MMU 
is set to 'y', which is not correct. The trivial patch attached to this 
email fixes this bad behaviour.

Regards,

Patrick Aussems, DTI sa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libc_unistd_makefile.patch
Type: text/x-patch
Size: 448 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20040112/2a0c9c5c/attachment.bin 


More information about the uClibc mailing list