Date: Tue, 15 Sep 1998 22:51:14 +0200 From: Ollivier Robert <roberto@keltia.freenix.fr> To: current@FreeBSD.ORG Subject: Re: Some more perl5 questions under elf Message-ID: <19980915225114.B9288@keltia.freenix.fr> In-Reply-To: <199809150650.IAA28146@gratis.grondar.za>; from Mark Murray on Tue, Sep 15, 1998 at 08:50:27AM %2B0200 References: <Pine.BSF.4.00.9809142300000.2677-100000@kushnir.kiev.ua> <199809150650.IAA28146@gratis.grondar.za>
next in thread | previous in thread | raw e-mail | index | archive | help
According to Mark Murray:
> > dynamically unless linked with -rdynamic (or at least the originally built
> > during buildworld doesn't). BTW, exactly the same situation I had with elf
> > X server and its modules, with development glib-1.1 and its libgmodule-1.1
> > and so on.
>
> I do not completely understand it, but this seems to be by design.
The reason is that the dynamically linked extentions references variables
and functions in the libperl library. In ELF, that won't work unless you
use the '-E' (or -rdynamic or -export-dynamic) to link the perl
binary. That option will export symbols as if they were from a shared lib:
-E
-export-dynamic
When creating an ELF file, add all symbols to the
dynamic symbol table. Normally, the dynamic symbol
table contains only symbols which are used by a dy-
namic object. This option is needed for some uses
of dlopen.
Look in hints/freebsd.sh:
-=-=-
3.0*) objformat=`/usr/bin/objformat`
if [ x$objformat = xelf ]; then
libpth="/usr/lib /usr/local/lib"
glibpth="/usr/lib /usr/local/lib"
ldflags="-Wl,-E "
lddlflags="-shared "
else
if [ -e /usr/lib/aout ]; then
libpth="/usr/lib/aout /usr/local/lib /usr/lib"
glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
fi
lddlflags='-Bshareable'
fi
cccdlflags='-DPIC -fpic'
;;
-=-=-
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 3.0-CURRENT #64: Fri Sep 11 23:22:44 CEST 1998
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980915225114.B9288>
