Patch to enable libgcj.dll for MinGW
Danny Smith
dannysmith@clear.net.nz
Thu Sep 8 11:34:00 GMT 2005
----- 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.
Danny
>> Anyway, I'd have no objection to
>> #ifdef OBJECT_FORMAT_ELF
>> because it's only ELF targets where we're sure this works.
>> Andrew.
More information about the Java
mailing list