L4Linux without libloader?

Daniel Vandersee dvandersee at escrypt.com
Thu Mar 23 16:42:54 CET 2006


Hi Adam,

I tried to take all libraries of libloader but it didn't work so far.
There are still many unresolved symbols. I also tried to add some
further libs but I didn't managed it.

I modified the L4LIBS entry in arch/l4/Makefile to:

> L4LIBS	= -L$(L4DIR)/lib/$(L4_MK_ARCH)_$(L4_MK_CPU)/$(L4_MK_API) \
> 		  -L$(L4DIR)/lib/$(L4_MK_ARCH)_$(L4_MK_CPU) \
> 		  -L$(L4DIR)/lib \
> 		  -L$(L4DIR)/kernel/fiasco/build \
> 		  -lc_be_l4env_start_stop.p	\
> 		  -lc_be_minimal_log_io.p	\
> 		  -lc_be_simple_mem.p		\
> 		  -lc_be_mmap.p			\
> 		  -lc_be_mmap_util.p \
> 		 --whole-archive \
> 		    -lsemaphore.p \
> 		    -lthread.p \
> 		    -ldm_generic.p \
> 		    -ldm_mem.p \
> 		    -lslab.p \
> 		    -ll4env_err.p \
> 		    -ll4rm.p \
> 		    -ll4env_loaderruntime.p \
> 		    -llogserver.p \
> 		    -lnames.p \
> 		    -lroot.o.p \
> 		    $(LOADERLIBS_$(LIBC_TYPE)) \
> 		    -lgeneric_ts.p \
> 		    -lloaderif.p \
> 		  --no-whole-archive \
> 		    -ll4util.p -ul4util_reboot -ugetopt_long \
> 		    -lc -umemcpy \
> 		    $(GCCLIB)

But make still complains:

> user at deb:~/fiasco/build/l4linux-2.6$ make
>   CHK     include/linux/version.h
> make[1]: »arch/i386/kernel/asm-offsets.s« ist bereits aktualisiert.
>   CHK     include/linux/compile.h
>   CHK     usr/initramfs_list
>   GEN     .version
>   CHK     include/linux/compile.h
>   UPD     include/linux/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/l4/kernel/built-in.o: In function `strtoul':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/arch/l4/kernel/main.c:1224: multiple definition of `strtoul'
> /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(strtoul.o):/home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/src/lib/minilibc/strtoul.c:4: first defined here
> ld: Warning: size of symbol `strtoul' changed from 195 in /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(strtoul.o) to 24 in arch/l4/kernel/built-in.o
> arch/l4/kernel/built-in.o: In function `exit':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/arch/l4/kernel/main.c:1010: multiple definition of `exit'
> /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(atexit.o):/home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/src/lib/minilibc/atexit.c:42: first defined here
> ld: Warning: size of symbol `exit' changed from 68 in /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(atexit.o) to 53 in arch/l4/kernel/built-in.o
> lib/lib.a(vsprintf.o): In function `vsprintf':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/lib/vsprintf.c:585: multiple definition of `vsprintf'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o):/home/daniel/fiasco_dlibc_noux/build/l4/pkg/log/lib/src/sprintf.c:42: first defined here
> ld: Warning: size of symbol `vsprintf' changed from 42 in /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o) to 29 in lib/lib.a(vsprintf.o)
> lib/lib.a(vsprintf.o): In function `snprintf':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/lib/vsprintf.c:535: multiple definition of `snprintf'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o):/home/daniel/fiasco_dlibc_noux/build/l4/pkg/log/lib/src/sprintf.c:33: first defined here
> ld: Warning: size of symbol `snprintf' changed from 45 in /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o) to 28 in lib/lib.a(vsprintf.o)
> lib/lib.a(vsprintf.o): In function `vsnprintf':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/lib/vsprintf.c:257: multiple definition of `vsnprintf'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o):/home/daniel/fiasco_dlibc_noux/build/l4/pkg/log/lib/src/sprintf.c:46: first defined here
> ld: Warning: size of symbol `vsnprintf' changed from 45 in /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o) to 1237 in lib/lib.a(vsprintf.o)
> lib/lib.a(vsprintf.o): In function `sprintf':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/lib/vsprintf.c:602: multiple definition of `sprintf'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o):/home/daniel/fiasco_dlibc_noux/build/l4/pkg/log/lib/src/sprintf.c:24: first defined here
> ld: Warning: size of symbol `sprintf' changed from 42 in /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(sprintf.s.o) to 29 in lib/lib.a(vsprintf.o)
> arch/l4/lib/arch-i386/built-in.o: In function `l4x_proc_init':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/arch/l4/lib/proc.c:(.text+0x0): multiple definition of `strstr'
> /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(strstr.o):/home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/src/lib/minilibc/strstr.c:4: first defined here
> ld: Warning: size of symbol `strstr' changed from 108 in /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(strstr.o) to 48 in arch/l4/lib/arch-i386/built-in.o
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libsemaphore.p.a(semaphore.s.o): In function `l4semaphore_thread':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/semaphore/lib/src/semaphore.c:322: undefined reference to `_exit'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libsemaphore.p.a(semaphore.s.o): In function `__alloc_entry':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/semaphore/lib/src/semaphore.c:115: undefined reference to `_exit'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libthread.p.a(stacks.s.o): In function `l4th_stack_init':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/thread/lib/src/stacks.c:132: undefined reference to `_exit'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libthread.p.a(exit.s.o): In function `__do_exit':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/thread/lib/src/OBJ-x86_586-l4v2/../../../../../include/x86/l4v2/l4/semaphore/asm.h:112: undefined reference to `_exit'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libthread.p.a(exit.s.o): In function `l4thread_exit':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/thread/lib/src/exit.c:242: undefined reference to `_exit'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libl4rm.p.a(libl4rm.s.o):/home/daniel/fiasco_dlibc_noux/build/l4/pkg/l4rm/lib/src/libl4rm.c:133: more undefined references to `_exit' follow
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libl4env_loaderruntime.p.a(environment.s.o): In function `l4env_request_service':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/l4env/lib/src/environment.c:67: undefined reference to `l4env_get_infopage'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libl4env_loaderruntime.p.a(environment.s.o): In function `l4env_request_config_u32':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/l4env/lib/src/environment.c:136: undefined reference to `l4env_get_infopage'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/libl4env_loaderruntime.p.a(environment.s.o): In function `l4env_get_default_dsm':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/l4env/lib/src/environment.c:242: undefined reference to `l4env_get_infopage'
> /home/daniel/fiasco_dlibc_noux/build/l4/lib/x86_586/l4v2/liblogserver.p.a(doprnt.s.o): In function `LOG_doprnt':/home/daniel/fiasco_dlibc_noux/build/l4/pkg/log/lib/src/doprnt.c:726: undefined reference to `__umoddi3'
> :/home/daniel/fiasco_dlibc_noux/build/l4/pkg/log/lib/src/doprnt.c:727: undefined reference to `__udivdi3'
> /home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/build/libc.a(atexit.o): In function `exit':/home/daniel/fiasco_dlibc_noux/build/l4/kernel/fiasco/src/lib/minilibc/atexit.c:49: undefined reference to `_exit'
> arch/l4/kernel/built-in.o: In function `l4x_hybrid_list_thread_remove':/home/daniel/fiasco_dlibc_noux/build/l4linux-2.6/include/asm-l4/l4-arch/asm/processor.h:600: undefined reference to `l4env_get_infopage'
> make: *** [.tmp_vmlinux1] Fehler 1

Any help would be appreciated.

Thanks in advance,
Daniel


Adam Lackorzynski schrieb:
> On Tue Mar 21, 2006 at 22:53:00 +0100, Daniel Vandersee wrote:
> 
>>is it possible to compile L4Linux without the need of libloader.s.so (e.g. by
>>using other libs) to have it statically linked?
> 
> 
> Not out of the box but it should be quite easy to do so. Just link
> against the needed subset of the nonpic libs listed in
> l4/pkg/loader/lib/runtime/Makefile.
> 
> 
> 
> Adam





More information about the l4-hackers mailing list