Re: State of Windows x64 COFF support?

2015-02-20 Thread Kagamin via Digitalmars-d-learn
Implementations can have bugs, probably COFF support wasn't 
stress tested.


Re: State of Windows x64 COFF support?

2015-02-19 Thread Etienne via Digitalmars-d-learn

On 2015-02-19 1:41 PM, ketmar wrote:


i remember that DMD creates one section for each function (to allow
smartlink feature). with templates this can be alot. maybe it needs new
cli flag --collapse-sections or something like it.



I watched the section names and discovered over 20,000 sections named : 
.debug$S


According to the code, a new .debug$S section is created every time it 
is searched with the flag IMAGE_SCN_LNK_COMDAT in:


https://github.com/D-Programming-Language/dmd/blob/de6fccf8391b1dfdb959fa0f089920c2c8e6aff8/src/backend/mscoffobj.c#L1724

I deleted this flag and now the program links correctly with COFF with 
50k sections.


It would have been easier to debug with an error in mscoffobj.c:1591:

assert(scnhdr_cnt  65536, Too many symbols for COFF format);

https://github.com/D-Programming-Language/dmd/blob/de6fccf8391b1dfdb959fa0f089920c2c8e6aff8/src/backend/mscoffobj.c#L1591

With this simple patch on the compiler, there are stil some errors 
compiling Botan on win64, but they are not related to the COFF format 
anymore.


Re: State of Windows x64 COFF support?

2015-02-19 Thread ketmar via Digitalmars-d-learn
On Thu, 19 Feb 2015 13:29:58 -0500, Etienne wrote:

 On 2015-02-19 11:39 AM, Etienne wrote:
 I'm having corrupt symbol table errors on a Win64 build of a big
 application, I can't find a way around it. I'm wondering if the COFF
 support is still experimental in DMD?

 Thanks!
 
 I just counted 67k sections using a printf in DMD... The limit is 65k so
 that explains that.

i remember that DMD creates one section for each function (to allow 
smartlink feature). with templates this can be alot. maybe it needs new 
cli flag --collapse-sections or something like it.

signature.asc
Description: PGP signature


Re: State of Windows x64 COFF support?

2015-02-19 Thread Etienne via Digitalmars-d-learn

On 2015-02-19 11:39 AM, Etienne wrote:

I'm having corrupt symbol table errors on a Win64 build of a big
application, I can't find a way around it. I'm wondering if the COFF
support is still experimental in DMD?

Thanks!


I just counted 67k sections using a printf in DMD... The limit is 65k so 
that explains that.


State of Windows x64 COFF support?

2015-02-19 Thread Etienne via Digitalmars-d-learn
I'm having corrupt symbol table errors on a Win64 build of a big 
application, I can't find a way around it. I'm wondering if the COFF 
support is still experimental in DMD?


Thanks!