This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: 64bit: C++ templates
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 20 May 2013 15:14:51 +0200
- Subject: Re: 64bit: C++ templates
- References: <516CDE32 dot 5000206 at users dot sourceforge dot net> <516F5F89 dot 40600 at users dot sourceforge dot net> <518C9018 dot 9030606 at users dot sourceforge dot net> <CAEwic4aPQHUChVWui6h0FctFkHXh3A0zwh1On50cJRE=SV1UeA at mail dot gmail dot com> <CAEwic4ZAy++TifyZR=XZnD_xahM0GOdO-XREvY6ZdKGQRc+ykA at mail dot gmail dot com> <20130516082534 dot GB11933 at calimero dot vinschen dot de> <5199C9DB dot 8040406 at users dot sourceforge dot net> <20130520092614 dot GA31140 at calimero dot vinschen dot de>
2013/5/20 Corinna Vinschen wrote:
> Hi Yaakov,
>
> On May 20 01:59, Yaakov (Cygwin/X) wrote:
>> On 2013-05-16 03:25, Corinna Vinschen wrote:
>> >Yesterday it turned out that the visibility stuff is not the real
>> >problem. Mingw gcc 4.8 also produces the same set of symbols, but it
>> >doesn't fail when linking.
>>
>> Is that surprising, given that PE-COFF medium/large code models were
>> only added to trunk (AFAIK) post-4.8?
>
> well, this is not exactly related to the medium/large code model
> introduction but rather a feature of gcc 4.8. The same problematic
> symbols are generated in the small code model in 4.8, but not with gcc
> 4.7.2.
>
>> >Some more testing now showed clearly that this problem is related to the
>> >high address used as base addresses in the Cygwin toolchain. If you
>> >build the harfbuzz DLL not with
>> >
>> > -Wl,--enable-auto-image-base
>> >
>> >but instead with a fixed address in the lower 31 bit address area,
>> >for instance
>> >
>> > -Wl,--image-base -Wl,0x7ff00000
>> >
>> >the problem disappears and you can successfully build the DLL.
>>
>> This seems to fix harfbuzz wrt gtk2; gtk3 still isn't working, but
>> I'm not sure it's related yet.
>
> Dunno, but more info on that might help my collegues to fix the issue.
>
>> >Alternatively, you can also workaround this issue by building harfbuzz
>> >with the -mcmodel=large option, which doesn't suffer this problem due to
>> >the way symbols are only indirectly addressed.
>>
>> With this, the link succeeded but I got SEGVs in one of the same
>> symbols that failed to link previously.
>
> This is a weird one! Maybe there's still some bug in the large model
> code generation?!? OTOH, if that's only related to this kind of symbol
> it might be a related issue. Can you check if setting
> -fvisibility-inlines-hidden or -fno-visibility-inlines-hidden changes
> the outcome?
>
>> >Right now it seems this is a bfd bug in the relocation code. The code
>> >tests these 32 bit pc-relative offsets by checking if the result still
>> >fits into 31 bit, without taking the high image base into account.
>> >Also, for some reason this doesn't occur with all symbols, but only with
>> >a very specific set of symbols (weak and a special kind of section
>> >symbols).
>> >
>> >That's it for now. We're still looking into providing a solution.
>>
>> Please keep me posted.
>
> Sure!
>
>
> Thanks,
> Corinna
Beside the ongoing testings I do to solve this issue for binutils, it
might be of interest to see if change referenced at
c++/57317 might have impact on the template-issue here?
Cheers,
Kai