BID-coding an encapsulate

Björn Döbel doebel at os.inf.tu-dresden.de
Thu Jan 24 08:53:45 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

|> | The function name in the generated code is always prefixed with the
interface and library
|> names. In your case, this means that your function is called
|> a_aes256_init_call()- as you can also see from the generated
- -client.c file.
|
| I believe this function a_aes256_init_call() is used in the wrapper. I
didn't get any
| error while compiling my wrapper as well as my server code. Yes I did
call
| a_aes256_init_call() by it's name in it. However the error that I
| received happened while I'm compiling my client code which I call
| my function as aes_aes256_init(). I also have included my header
| which declared aes_aes256_init(). Here is my error:
|
- 
----------------------------------------------------------------------------
| root at lucy-ubuntu:/home/fiasco/l4/pkg/aes_1/examples/client# make
O=/home/fiasco/build/

1st - why do you build as root?

| PWD=/home/fiasco/build/pkg/aes_1/examples/client/OBJ-x86_586-l4v2 make
  -C /home/fiasco/build/pkg/aes_1/examples/client/OBJ-x86_586-l4v2 -f
Makefile
| make[1]: Entering directory
`/home/fiasco/build/pkg/aes_1/examples/client/OBJ-x86_586-l4v2'
|   ... Compiling main.o
| LD_PRELOAD=/home/fiasco/build/tool/gendep/libgendep.so
GENDEP_TARGET=main.o GENDEP_BINARY=cc1   gcc -m32 -c     -DUSE_UCLIBC=y
- -DRAM_BASE=0x0    -DSYSTEM_x86_586_l4v2 -DARCH_x86 -DCPUTYPE_586
- -DL4API_l4v2 -DCONFIG_L4_CALL_SYSCALLS -DCONFIG_L4_ABS_SYSCALLS
- -I/home/fiasco/build/pkg/aes_1/idl/OBJ-x86-l4v2
- -I/home/fiasco/build/include/x86/l4v2 -I/home/fiasco/build/include/l4v2
- -I/home/fiasco/build/include/x86 -I/home/fiasco/build/include
- -I/home/fiasco/l4/../dice/include -I/home/drops/include/x86/l4v2
- -I/home/drops/include/l4v2 -I/home/drops/include/x86
- -I/home/drops/include -nostdinc -I/home/fiasco/build/include/x86/uclibc
- -I/home/fiasco/build/include/uclibc
- -I/home/fiasco/build/include/uclibc++ -I/home/drops/include/x86/uclibc
- -I/home/drops/include/uclibc -I/home/drops/include/uclibc++
- -I/usr/lib/gcc/i486-linux-gnu/3.4.6/include -gstabs+      -g -O2
- -fno-strict-aliasing  -march=i586 -Wall -Wstrict-prototypes
- -Wmissing-prototypes -Wmissing-declarations  -fno-common
/home/fiasco/l4/pkg/aes_1/examples/client/main.c -o main.o
|   ==> Linking aesclient
| LD_PRELOAD=/home/fiasco/build/tool/gendep/libgendep.so
GENDEP_TARGET=aesclient GENDEP_BINARY=ld  GENDEP_BINARY_ALT1=ld ld -m
elf_i386 -o aesclient /home/fiasco/build/lib/x86_586/crt0.o main.o
aes256-client.o -Ttext=0x1100000 --hash-style=sysv
- -L/home/fiasco/build/lib/x86_586/l4v2 -L/home/fiasco/build/lib/x86_586
- -L/home/fiasco/build/lib -L/home/drops/lib/x86_586/l4v2
- -L/home/drops/lib/x86_586 -L/home/drops/lib
- -T/home/fiasco/build/lib/x86_586/main_stat.ld -laes256  -static
- -lgeneric_ts -ll4env -ll4rm -ldm_generic -ldm_mem -lthread -lsemaphore
- -llogserver_capsule -lnames -ll4util_root -ll4util -lsigma0 -lroot
- -ll4env -ll4env_err -ll4rm -ldm_generic -ldm_mem -lthread -lslab -ll4sys
- -nostdlib  -luc_c -luclibc_support -u mmap_anon -lc_be_simple_mem
- -lc_be_mmap -lc_be_mmap_util -lc_be_l4env_start_stop
- -lc_be_minimal_log_io -luc_be_simple_sleep -ll4env -llogserver_capsule
- -ll4rm -ldm_generic -ldm_mem -lthread -lgeneric_ts -luc_c
/usr/lib/gcc/i486-linux-gnu/3.4.6/libgcc.a -luc_c -ll4sys
- -Ttext=0x1100000 --warn-common -gc-sections
| main.o: In function `main':
| /home/fiasco/l4/pkg/aes_1/examples/client/main.c:20: undefined
reference to `aes_aes256_init'
| make[1]: *** [aesclient] Error 1
| make[1]: Leaving directory
`/home/fiasco/build/pkg/aes_1/examples/client/OBJ-x86_586-l4v2'
| make: ***
[/home/fiasco/build/pkg/aes_1/examples/client/OBJ-x86_586-l4v2] Error 2
|
- 
----------------------------------------------------------------------------

Ok. So aes_aes256_init is a function defined by your wrapper library? In
this case you should also link your wrapper lib to your application.
This can be done by adding

LIBS += -laesclient

to the example client's Makefile.

If this still does not solve your error, please send a archive of your
full pkg/aes directory.

Bjoern
- --
Dipl.-Inf. Bjoern Doebel    Mail: doebel at tudos.org
TU Dresden, OS Chair        Phone: +49 351 463 38 799
Noethnitzer Str. 46         Fax:   +49 351 463 38 284
01187 Dresden, Germany
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmEQJP5ijxgQLUNkRArD6AJ0eyDqlC89qSNQNGseyfz/HPIaewwCgmgBp
SfYplS6VQbBFANWWsrmcFYo=
=KFOv
-----END PGP SIGNATURE-----




More information about the l4-hackers mailing list