Patch to enable libgcj.dll for MinGW

Andrew Haley aph@redhat.com
Thu Sep 8 12:25:00 GMT 2005


Danny Smith writes:
 > 
 > ----- Original Message -----
 > From: "Andrew Haley">
 > Sent: Thursday, 8 September 2005 22:48
 > >
 > > Interestingly, cygwin.h includes this:
 > >
 > > /* Binutils does not handle weak symbols from dlls correctly.  For now,
 > >    do not use them unnecessarily in gthr-posix.h.  */
 > > #define GTHREAD_USE_WEAK 0
 > >
 > > but mingw32 doesn't.  I assume that mingw32 binutils has exactly the
 > > same bug, so this is perhaps a mistake.  Danny?
 > 
 > 
 > MinGW doesn't  use gthr-posix.h, so there is no need for the define.
 > 
 > The reason why " Binutils does not handle weak symbols from dlls correctly."
 > is because dlls are normally accessed via an import lib, which is a static
 > archive, with effectively one export per member object.  Weak symbols are not
 > resolved by an archive member unless the member is needed to resolve a "strong"
 > undef.  (as per SVR4 ABI)
 > 
 > The bug is that __attribute__((weak)) on PE-COFF targets, should actually be
 > __attribute__((weak ("search" ))) where "search" indicates what type of objects
 > to search.

Thanks very much for the info.  One really weird thing is that I can't
find a target-specific #define for PE-COFF anywhere.  That's OK,
because we can use ! OBJECT_FORMAT_ELF, but it seems a bit weird.

Andrew.




More information about the Java mailing list