Fail to load shared objects on AIX
Heinrich Mislik
Heinrich.Mislik at univie.ac.at
Thu Jan 17 12:11:28 GMT 2008
On 15 Jan 2008 at 22:47, Volker Lendecke wrote:
> Probing module
> '/home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so'
> Error loading module
> '/home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so':
> rtld: 0712-001 Symbol _talloc_realloc_array was referenced
> from module
> /home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so(), but
> a runtime definition
> of the symbol was not found.
> rtld: 0712-001 Symbol _talloc_array was referenced
> from module
> /home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so(), but
> a runtime definition
> of the symbol was not found.
> rtld: 0712-001 Symbol _talloc_zero was referenced
> from module
> /home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so(), but
> a runtime definition
> of the symbol was not found.
> Can't find a vfs module
> [/home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so]
> smbd_vfs_init: vfs_init_custom failed for
> /home/build/build_farm/samba_3_2_test/source/bin/xattr_tdb.so
>
> when trying to connect the tmp share defined in server.conf
> of the build farm scripts. When looking at "nm bin/smbd",
> it says:
>
> ._talloc_realloc T 268559344
> ._talloc_realloc_array T 268554040
> ._talloc_realloc_array at AF90_40 t 268579484
>
> Similarly for the other symbols.
Always use dump -Tv on AIX to get the true story. Depending on your
object_mode
the -X32 or -X64 flag my be required.
As an example:
dump -Tv -X64 lib/vfs/readonly.so
gives
lib/vfs/readonly.so:
***Loader Section***
***Loader Symbol Table Information***
[Index] Value Scn IMEX Sclass Type IMPid
Name
[0] 0x00000000 undef IMP RW EXTref libc.a(shr_64.o)
errno
[1] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
__mod_init
[2] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
exit
[3] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
strlen
[4] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
abort
[5] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
time
[6] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
strncmp
[7] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
isspace
[8] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
islower
[9] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
toupper
[10] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
localtime
[11] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
gmtime
[12] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
mktime
[13] 0x00000000 undef IMP DS EXTref libc.a(shr_64.o)
isalpha
[14] 0x00000000 undef IMP RW EXTref libc.a(shr_64.o)
__n_pthreads
[15] 0x00000000 undef IMP RW EXTref libc.a(shr_64.o)
__malloc_user_defined_name
[16] 0x00000000 undef IMP RW EXTref libc.a(shr_64.o)
__crt0v
[17] 0x1100013f0 .data ENTpt DS SECdef [noIMid]
__start
[18] 0x110001400 .data EXP DS SECdef [noIMid]
init_module
[19] 0x110001430 .data EXP DS SECdef [noIMid]
get_date
[20] 0x110001448 .data EXP DS SECdef [noIMid]
yyparse
[21] 0x110001460 .data EXP DS SECdef [noIMid]
strcmp
[22] 0x110001470 .data EXP RW BSS [noIMid]
p_xargc
[23] 0x110001478 .data EXP RW BSS [noIMid]
p_xargv
[24] 0x1100014b0 .data EXP RW BSS [noIMid]
p_xrcfg
[25] 0x1100014b4 .data EXP RW BSS [noIMid]
p_xrc
[26] 0x1100015b0 .bss EXP RW BSS [noIMid]
fc_softc
[27] 0x1100015b8 .bss EXP RW BSS [noIMid]
ras_arg_t
[28] 0x1100015d0 .bss EXP RW BSS [noIMid]
end
[29] 0x00000000 undef IMP DS EXTref ..
main
[30] 0x00000000 undef IMP DS EXTref ..
smb_register_vfs
[31] 0x00000000 undef IMP DS EXTref ..
lp_parm_string_list
The important things to look at:
Any symbol in the .so called from the main module must have EXP in
the
IMEX column.
Any symbol the .so calls in the main module must have .. or . in the
IMPId column.
BUilding shared object with cc -G takes care of that.
HtH
Cheers
Heinrich
--
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
More information about the samba-technical
mailing list