[PATCH] Build libgcc_s on Windows
Danny Smith
dansmister@gmail.com
Thu Aug 21 03:45:00 GMT 2008
On Thu, Aug 21, 2008 at 1:58 AM, Aaron W. LaFramboise
<aaronavay62@aaronwl.com> wrote:
> 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.
If there is no need for unwind info then it is unnecessary to pull in
unwind-dw2-fde.o from static libgcc.a. Mingw users have in past
complained when unwind-dw2-fde.o was always pulled in, saying that it
was unwanted bloat for small apps.
Danny
More information about the Libstdc++
mailing list