Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: libcmpl vs libffm !!!!
Date: Sun, 7 Mar 1999 00:00:42 -0700 (MST)	[thread overview]
Message-ID: <199903070700.AAA23959@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <19990306012353.A29909@twiddle.net> from "Richard Henderson" at Mar 6, 99 01:23:53 am

Richard Henderson wrote:
> 
> On Mon, Apr 11, 2135 at 08:23:48PM +0100, Jochen Kuepper wrote:
> > I just found a static lib yet :-( Is there a shared libcmpl ?
> 
> The one nice thing about defaulting to PICish code...
> 
>   ld -shared --whole-archive libcpml.a --no-whole-archive -lc -o libcpml.so
> 

There is a small fly in this ointment.  A conversion is indeed performed
but when I tried to link something with such shared library I got:

/usr/local/lib/libcpml.so: undefined reference to `_OtsMulX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsCvtXQ'
/usr/local/lib/libcpml.so: undefined reference to `_OtsCvtQX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsLssX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsDivide32Unsigned'
/usr/local/lib/libcpml.so: undefined reference to `_OtsDivX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsNeqX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsSubX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsLeqX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsDivide64Unsigned'
/usr/local/lib/libcpml.so: undefined reference to `_OtsDivide64'
/usr/local/lib/libcpml.so: undefined reference to `_OtsAddX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsDivide32'
/usr/local/lib/libcpml.so: undefined reference to `_fpdata'
/usr/local/lib/libcpml.so: undefined reference to `_OtsConvertFloatTX'
/usr/local/lib/libcpml.so: undefined reference to `_OtsGtrX'
collect2: ld returned 1 exit status

while linking with a static library was ok.

A short investigation revealed that libcpml.a indeed contains a bunch
of functions which reference those unresolved symbols above.  The catch
is that these are functions you are not likely to call and if you do
then you will see the same "undefined reference" - at least for now. :-)
In a shared library all these symbols end up in _GLOBAL_OFFSET_TABLE_
and this makes 'ld' very unhappy.

In other words - it seems that first you have to use 'ar' to remove
from libcpml.a all offending functions and only then you may convert.
I did not try that yet but it should work (the famous last words :-).

(Later - indeed "the famous".  I missed a presence of _fpdata
which you cannot delete that way and which is still 'U' in a working
program linked with libcpml.a.  Can somebody explain what is really
going on here? It does not seem to be resolved by other libraries
but maybe I miss something.)


  Michal


  reply	other threads:[~1999-03-07  7:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03 18:25 libcmpl vs libffm !!!! designer seven
1999-03-03 18:23 ` Francois LAPERRUQUE
1999-03-04  2:23   ` Michael Tibor
1999-03-04  2:28     ` Daniel J. Frasnelli
1999-03-04  3:01       ` Chris Albertson
1999-03-04  3:01         ` Greg Lindahl
1999-03-04  3:15           ` Michael Tibor
1999-03-04  3:20             ` Greg Lindahl
1999-03-04  3:32               ` norvierk
1999-03-04 13:08           ` Jochen Kuepper
1999-03-04 13:13             ` Francois LAPERRUQUE
1999-03-06  9:23             ` Richard Henderson
1999-03-07  7:00               ` Michal Jaegermann [this message]
1999-03-07  8:04                 ` Richard Henderson
1999-03-07 17:45                   ` shared libcpml (was: Re: libcmpl vs libffm !!!!) Michal Jaegermann
1999-03-03 23:43 ` libcmpl vs libffm !!!! Steven N. Hirsch
  -- strict thread matches above, loose matches on Subject: below --
1999-03-03 18:07 Francois LAPERRUQUE
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox