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

Bug#227906: libc6: Failed assertion in ld.so



On Fri, Jan 16, 2004 at 09:47:02AM +0300, Vladimir Prus wrote:
> Daniel Jacobowitz
> 
> > > Vladimir Prus wrote:
> > > > Hello,
> > > > I have a small example where use of -static-libgcc and -Wl,-Bstatic
> > > > flags cause ld.so do assert.
> > > >
> > > > I have file app.cpp containing
> > > >
> > > >    int main() { return 0; }
> > > >
> > > > and lib.cpp, which is empty. I compile them with
> > > >
> > > >    g++ -o lib.so -shared -static-libgcc lib.cpp -Wl,-Bstatic
> > > >    g++ -o app app.cpp lib.so -static-libgcc -Wl,-Bstatic
> >
> > What is this trying to accomplish?  You're going to get shared
> > versions of some libraries and dynamic versions of others.
> 
> This is trying to get static version of all "runtime" libraries: such as 
> libstd++, libc and libgcc, but link to dynamic lib.so

I have no idea if that is possible.  I don't think that it is.  If you
link to libc.a, then you will not have an initialized dynamic loader,
and shared libraries will not be properly loaded.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: