[PATCH] Build libgcc_s on Windows
Aaron W. LaFramboise
aaronavay62@aaronwl.com
Wed Aug 20 14:30:00 GMT 2008
Danny Smith wrote:
>> +/* Weak symbols do not get resolved if using a Windows dll import lib.
>> + Make the unwind registration references strong undefs. */
>> +#if DWARF2_UNWIND_INFO
>> +#define SHARED_LIBGCC_UNDEFS_SPEC \
>> + "%{shared-libgcc: -u ___register_frame_info -u ___deregister_frame_info}"
>> +#else
>> +#define SHARED_LIBGCC_UNDEFS_SPEC ""
>> +#endif
>
> I agree this is the safest way to handle weak linkage in libgcc_s_1.dll
> While your at it you may as well clean up the use of
> GetModuleHandle/GetProcAddress to get in cygming-crtbegin.
OK, I will, but there is something that is unclear to me actually.
Why are the references to __register_frame_info in crtbegin weak in the
first place? Shouldn't it always be able to find these symbols in
libgcc, whether dynamic or not? It's not obvious to me what case there
would be where this symbol would not be available.
(The JCR situation makes more sense to me, even if this is a little
unfortunate. It might be better to generate undefs that pull in the JCR
code only if there are some class definitions.)
More information about the Gcc-patches
mailing list