This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: shared c++ lib on powerpc-ibm-aix4.1.5.0. Done by hand!
- To: Paul Maragakis <plm at mpq dot mpg dot de>
- Subject: Re: shared c++ lib on powerpc-ibm-aix4.1.5.0. Done by hand!
- From: Andrey Slepuhin <pooh at msu dot ru>
- Date: Mon, 08 Dec 1997 18:52:27 +0300
- CC: egcs at cygnus dot com
- Organization: Moscow State University, Network Management Department
- References: <9712081313.AA40402@mpqibmr1.mpq.mpg.de>
Paul Maragakis wrote:
> Get a list of the exported symbols:
>
> cd objdir/libraries/libstdc++/
> for i in `cat piclist`; do \
> nm -BChg $i | grep " D " | cut -c14- >> libnewstdc++.exp; \
> done
>
> Link the shared object:
>
> ld -o libnewstdc++.so `cat piclist` -bE:libnewstdc++.exp -bM:SRE \
> -lm -L [path to egcs gcc library ...gcc-lib/powerpc-ibm... ]
> -lgcc -lc
>
> Put into an archive so that linking goes with normal procedures:
>
> ar qv libnewstdc++.a libnewstdc++.so
You are not correct, because linking a shared C++ library needs
additional code for global constructors/destructors calls. This
extra code is generated by collect2 routine, but current implementation
is not correct.
Andrey.