Subject: Re: dlsym(3) is buggy
To: Shin'ichiro TAYA <taya@sm.sony.co.jp>
From: Olaf Seibert <rhialto@polderland.nl>
List: current-users
Date: 11/08/2000 12:03:25
On Wed 08 Nov 2000 at 19:01:31 +0900, Shin'ichiro TAYA wrote:
> It looks like a mozilla problem with a.out system...
> 1.4.1/alpha is a.out?

I should have mentioned that NetBSD/Alpha is ELF. I want to try this on
an a.out system (i386 1.4.2) later.

> Mozilla problem was solved with -Wl,-Bsymbolic.
> Please try it.

I tried it anyway. Adding it to gpg itself made no difference, adding it
to the idea module gave an error:

azenomei.3:/home/tmp/security/gnupg104/work.alpha/gnupg-1.0.4/cipher$ cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl  -I/usr/pkg/include  -O2 -Wall -g -DIS_MODULE -shared -rdynamic -fPIC -Wl,-Bshareable -Wl,-x -o idea ./idea.c -Wl,-Bsymbolic
/tmp/ccuKlQY2.o: In function `selftest':
/home/tmp/security/gnupg104/work.alpha/gnupg-1.0.4/cipher/./idea.c:445: undefined reference to `g10_log_fatal'
/home/tmp/security/gnupg104/work.alpha/gnupg-1.0.4/cipher/./idea.c:445: undefined reference to `g10_log_fatal'
collect2: ld returned 1 exit status

g10_log_fatal is still defined in the main program.

I remember from BeOS, which used to use PEF (Apples semi-propriatary
format) that (for this sort of cases) you can link dynamic objects with
the executables they are designed to go with, so that the linker knows
the symbols will eventually be defined. (The main program is of course
not incorporated in the dynamic object.)

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@polder    -- Ah only did well at school
\X/ land.nl       -- tae git intae an O level class tae git away fae Begbie.
Hi! I am a .signature virus. Copy me into your .signature to help me spread.