libtool-patches
[Top][All Lists]
Advanced

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

Re: lt_dlpreload_open ... BANG!


From: Ralf Wildenhues
Subject: Re: lt_dlpreload_open ... BANG!
Date: Mon, 18 Oct 2004 01:21:20 +0200
User-agent: Mutt/1.5.6+20040722i

* Bob Friesenhahn wrote on Fri, Oct 15, 2004 at 06:12:20AM CEST:
> >* Bob Friesenhahn wrote on Mon, Oct 11, 2004 at 02:17:00AM CEST:
> >>MinGW crashes in the mdemo test while executing lt_dlpreload_open.
> >>GDB reveals that the first element of preloaded_symlists contains a
> >>symlist with null members:
> >>
> >*snip trace*
> >>
> >>Naturally, this causes an immediate crash in streq().
> >>
> >>Is it supposed to be possible for this condition to occur?  Why might
> >>this condition occur for MinGW but not for other systems?  It does
> >>work for Cygwin.
> >
> >Can you show the libtool-generated C file containing the symbols?
> >(something like .libs/mdemoS.c, use RM=echo with the `libtool' call to
> >keep that intermediate file).  If nothing conclusive shows up there,
> >could you add the output of `bt full' and maybe `info globals' to your
> >backtrace?
>
> (gdb) bt full
>
[ backtrace snipped ]

> Things would be a lot easier if source-level debug was available. 
> Unfortunately, MinGW's gdb refuses to load source files using SMB 
> paths.

Well, what you can do to avoid m4'ing all over the place on mingw:
make dist on some serious operating system and use that tarball for
testing (should not be much slower than over SMB).


Anyway, I went ahead and installed mingw on my old home machine.
And I found what I think is a mingw linker bug .. but I don't know that
for sure, so treat the following with a grain of salt.

I looked at mdemo/mdemo.exe after mdemo-{static,make}.test.
Interestingly, gdb reveals that while lt__PROGRAM__LTX_preloaded_symbols
shows nothing unusual, lt_libltdlc_LTX_preloaded_symbols has merely a
null entry.  nm reveals that the symbol is in the BSS section (B).

How does this happen?  The only other thing that struck me as unusual
was that lt_libltdlc_LTX_preloaded_symbols is defined (D) in
libltdl/.libs/libltdlcS.o and listed as common symbol (C) in
libltdl/.libs/libltdlc_la-ltdl.o.  Could it be that the linker does not
do the right thing here?  (The const-relocation problem should only be
visible with a non-static setup, right?)

I don't know too much about mingw and windows.  Just changing the order
of the objects within the archive (to have libltdlcS.o before the other)
did not help to use the correct symbol definition.

If anyone is interested, I can provide more information.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]