Subject: shared library symbol problems: jabberd 1.4.2 on 1.5.4_ALPHA/sparc
To: None <pkgsrc-wip-discuss@sourceforge.net, port-sparc@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: port-sparc
Date: 08/08/2003 10:01:52
I built jabberd 1.4.2 on a NetBSD 1.5-stable SS20 (quite recent
system build).

When trying to start jabber, it tries to dynlink in jsm.so, and fails:

Loading /usr/pkg/lib/jabberd/jsm.so failed: '/usr/pkg/lib/jabberd/jsm.so: Undefined symbol "" (reloc type = 12, symnum = 4)'

And then jabberd exits because it doesn't understand the config file
directive telling it to use jsm.so.

objdump --syms on jsm.so gives:

jsm.so:     file format elf32-sparc

SYMBOL TABLE:
000000b4 l    d  .hash  00000000 
000009e4 l    d  .dynsym        00000000 
00001e14 l    d  .dynstr        00000000 
000030bc l    d  .rela.text     00000000 
00013364 l    d  .rela.got      00000000 
000133b8 l    d  .rela.plt      00000000 
000133d0 l    d  .init  00000000 
000134f0 l    d  .text  00000000 
00021b6c l    d  .fini  00000000 
00021c18 l    d  .rodata        00000000 
00024f98 l    d  .note.netbsd.ident     00000000 
00034fb0 l    d  .data  00000000 
000353c0 l    d  .eh_frame      00000000 
000353c4 l    d  .ctors 00000000 
000353cc l    d  .dtors 00000000 
000353d4 l    d  .plt   00000000 
00035420 l    d  .got   00000000 
00035448 l    d  .dynamic       00000000 
000354f0 l    d  .bss   00000000 
00000000 l    d  .stab  00000000 
00000000 l    d  .stabstr       00000000 
00000000 l    d  .comment       00000000 
000006ac l    d  .rela.stab     00000000 
00000000 l    d  *ABS*  00000000 
00000000 l    d  *ABS*  00000000 
00000000 l    d  *ABS*  00000000 
000353c4 l     O .ctors 00000004 __CTOR_LIST__
00034fb0 l     O .data  00000004 initialized.6
000353c0 l     O .eh_frame      00000000 __EH_FRAME_BEGIN__
000354f0 l     O .bss   00000000 object.7

I suspect the .rela.text .rela.got and .rela.plt, but I don't really
know what they are for.

jsm.so is built like this:

cc -O2 -I/usr/pkg/include -g -Wall -I. -I.. -I/usr/include/openssl -DHAVE_SSL -I/usr/pkg/include  -I../jabberd/ -shared -o jsm.so deliver.o jsm.o modules.o offline.o server.o authreg.o sessions.o users.o util.o modules/mod_admin.o modules/mod_agents.o modules/mod_browse.o modules/mod_announce.o modules/mod_auth_plain.o modules/mod_auth_digest.o modules/mod_auth_0k.o modules/mod_echo.o modules/mod_filter.o modules/mod_groups.o modules/mod_presence.o modules/mod_xml.o modules/mod_roster.o modules/mod_time.o modules/mod_vcard.o modules/mod_version.o modules/mod_register.o modules/mod_log.o modules/mod_last.o modules/mod_offline.o -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -L/usr/lib -L/usr/pkg/lib -lssl -lcrypto -lpth -lresolv

I had a problem that might be similar a while ago with libc.  But that
seemed to have to do with .rela.init and .rela.fini.

  http://mail-index.netbsd.org/netbsd-users/2003/06/05/0002.html