This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Bstatic & -shared problems / example


On Tue, Apr 16, 2002 at 02:01:54PM +0200, Franz Sirl wrote:

> Why should the linker extract anything at all from these libraries? You 
> listed them in front of your object file! Change the order of your command 
> line.

That commandline works fine - you misunderstand me. But the commandline is
indeed duplicate.

The reduced question is, why does this work fine:

$ ar x /opt/postgresql/lib/libpq++.a $(ar t /opt/postgresql/lib/libpq++.a)
$ ar x /opt/postgresql/lib/libpq.a $(ar t /opt/postgresql/lib/libpq.a)
$ g++ -L/opt/postgresql/lib -lssl -lcrypt
 -lcrypto -Wl,-soname -Wl,libgpsqlbackend.so.0 -shared  -o
 libgpgsqlbackend.so *.o

Any why doesn't this:

$ g++ -L/opt/postgresql/lib -lssl -lcrypt -lcrypto  -Wl,-Bstatic -lpq++ -lpq
 -Wl,-Bdynamic -Wl,-soname -Wl,libgpsqlbackend.so.0 -shared -o
 libgpgsqlbackend.so pgsqlbackend.o

Because as far as I can see, these should be identical. The difference:

First commandline:
$ nm -C ./libgpgsqlbackend.so  | grep PgDatabase::Tuples
0001b860 T PgDatabase::Tuples() const

Second commandline:
$ nm -C ./libgpgsqlbackend.so  | grep PgDatabase::Tuples
         U PgDatabase::Tuples() const

Thanks for your time.

Regards,

bert hubert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]