[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shared libraries, dependencies and symbols files



On Tue, Oct 02, 2007 at 12:06:17AM -0700, Steve Langasek wrote:
> On Tue, Oct 02, 2007 at 08:32:40AM +0200, Michael Koch wrote:
> > On Tue, Oct 02, 2007 at 12:21:31AM +0100, Ben Hutchings wrote:
> > > diff -u <(c++filt <libskstream-0.3-4_i386 | sort) <(c++filt <libskstream-0.3-4_amd64 | sort)
> > > --- /dev/fd/63  2007-10-02 00:19:14.445928644 +0100
> > > +++ /dev/fd/62  2007-10-02 00:19:14.445928644 +0100
> > > @@ -102,7 +102,7 @@
> > >   raw_socket_stream::raw_socket_stream(FreeSockets::IP_Protocol)@Base 0.3.6-2
> > >   raw_socket_stream::setBroadcast(bool)@Base 0.3.6-2
> > >   raw_socket_stream::setProtocol(FreeSockets::IP_Protocol)@Base 0.3.6-2
> > > - socketbuf::setbuf(char*, int)@Base 0.3.6-2
> > > + socketbuf::setbuf(char*, long)@Base 0.3.6-2
> > >   socketbuf::setSocket(int)@Base 0.3.6-2
> > >   socketbuf::~socketbuf()@Base 0.3.6-2
> > >   socketbuf::~socketbuf()@Base 0.3.6-2
> 
> > That was exactly what I was referring to. Sorry for being unclear.
> 
> Oh, yes, ok.
> 
> > Is it a common problem that APIs use some 32-bit data types on 32-bit
> > archs/userland and 64-bit data types on 64-bit archs?
> 
> Well, on a 32-bit arch, a long is a 32-bit type; on a 64-bit arch, a long is
> a 64-bit type.  And AIUI, on 32-bit archs a "long" is called an "int" in C++
> symbol-mangling.

In may case the culprit type is std::streamsize which is defined by
ptrdiff_t and this is arch specific. That is way the setBuf method has
different definition:

  32-bit archs:

    _ZN9socketbuf6setbufEPci@Base 0.3.6-2

  64-bit archs:

    _ZN9socketbuf6setbufEPcl@Base 0.3.6-2

Note the 'i' vs 'l'. 


Cheers,
Michael



Reply to: