Subject: Re: Fw: Fighting gst-plugins
To: Martin Husemann <martin@duskware.de>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-userlevel
Date: 04/05/2004 19:36:43
On Mon, 5 Apr 2004 18:00:39 +0200
Martin Husemann <martin@duskware.de> wrote:

> On Mon, Apr 05, 2004 at 05:24:55PM +0200, Julio M. Merino Vidal wrote:
> > > What is the output of "objdump -R libgstaudio.so | grep gst_audio_clock_new"?
> > 
> > Nothing...  is that good or bad?
> 
> That means, for whatever reason, libgstaudio is not dynamically exporting
> that symbol. This explains your problem ;-)

Looking at objdump -R output, I see that some functions appear, while others
don't.  I haven't been able to guess the rationale behind that, though.  If
I manually define a 'void foo(void)' function in any of those source files,
it doesn't get exported (but it appears in nm as T).  But if I add a call to
foo() inside any of the functions that already appeared in objdump -R, foo()
appears too.

So... went and tried with a simple test.c file that simply defines an empty
function.  The command to link it (which is what gst-plugins does more or
less, after calling libtool):

$ gcc -shared -Wl,--export-dynamic -fPIC -fpic -o test.so test.c

And what I get is the following:

$ nm test.so | grep func
00000678 T func
$ objdump -R test.so | grep func
$ 

Shouldn't func() appear as a dynamic relocation entry?  If not, what
determines which symbols should appear?

Thanks.

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/