Ainsi parlait Guillaume Cottenceau :
[..]
> > [guillaume@agathe guillaume]$ xmms
> > /usr/lib/xmms/Input/libcdread.so: undefined symbol: playlist_position
> >
> > Why does this error arise at runtime, while compilation was OK ? I
> > thought late binding was an OO feature ?
>
> The thing is that separated compilation with appropriate headers, and
> final linkage, are two different things.
>
> You have to think of creation of shared object more like creation of
> object file (e.g. with undefined symbols) rather than creation of
> binaries.
>
> Linkage of shared objects is done when the shared objects are loaded.
Does it means that libxmms is in incoherent state, having headers declaring 
function playlist_position, that is not really implemented ?

> No problem:
>
> [gc@obiwan ~/cvs/gi/mdk-stage1] cat > t.c
> int kloug();
> int func() {
>   kloug();
> }
> [gc@obiwan ~/cvs/gi/mdk-stage1] gcc -shared t.c -o plop.so
> [gc@obiwan ~/cvs/gi/mdk-stage1] objdump -x plop.so  | grep kloug
> 00000000         *UND*  00000000              kloug
>
>
> Problem:
>
> [gc@obiwan ~/cvs/gi/mdk-stage1] LD_PRELOAD=./plop.so ls
> ls: error while loading shared libraries: ./plop.so: undefined symbol:
> kloug
Can i deduce from your working directory that we'll have new (bugged) klung 
and plop features for future 8.1 stage 1 installer :-) ?
-- 
Guillaume Rousse <[EMAIL PROTECTED]>
GPG keys http://www.univ-reunion.fr/~grousse/gpgkeys.html

Reply via email to