Linker errors


J

Jonathan Payne

Sorry to post this again. I didn't get any responses the previous time I
posted and I really would appreciate an answer.



Even if someone could just acknowledge that this is a bug and/or give me a
few clues as to what factors I could change to reduce this problem.



I am getting these linker errors even more frequently now (today they
started occurring after about three builds after a complete rebuild).



It should be quite easy for someone to search for LNK1000 in a bugs database
or to have a look at the debug files for the linker to see what code is at
eip in the register dumps.



I am happy to try and extract any other debug information that you might
need.



Original post ->



I am having some problems with the linker and I was wondering if anyone had
any suggestions. I am working on a large project (the main .exe file is
around 7 mb release, 14 mb debug) and after building a number of debug
builds I get a linker error (see below).

I do a complete clean and rebuild every evening so I have a fresh build by
the morning. By early afternoon (after perhaps 20 or so incremental
builds), I start seeing the linker errors and once they start occurring, I
get them roughtly every other time I build until I do a full rebuild.

The following knowledge base articles seem to detail similar problems but
for the 2002 edition of the compiler (I am using Visual Studio 2003):

http://support.microsoft.com/default.aspx?kbid=329593
http://support.microsoft.com/default.aspx?scid=kb;en-us;826326

As these have updated link.exe files from after the 2003 release, I was
wondering if the fix was discovered after the 2003 release and if so, if
Microsoft has an equivalent fix for Visual Studio 2003. Is there a hot fix
I could get from Microsoft support?

Alternatively, are there any work arounds? I was wondering if deleting some
of the intermediate files and letting it do a full relink at lunch time each
day would help but I think it is already doing a full relink after the
linker crashes as the previous link failed (although I am thinking of
experimenting with deleting the .ilk files at lunch time).

Of course the other solution would be not to use incremental linking but I
would like to carry on using it if possible (as a full link takes much
longer).

Jonathan

Here are the error messages. I have collected a few but as they are all
almost identical I will only post a selection:

14:46 09/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 010240E7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000001
Ecx = 01023DE8 Esi = 00E25368
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000001 Dr6 = 01023DE8
Dr2 = 00000000 Dr7 = 00000000

14:54 09/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 010240E7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000001
Ecx = 01023DE8 Esi = 00E25368
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000001 Dr6 = 01023DE8
Dr2 = 00000000 Dr7 = 00000000

14:27 11/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 00D970D7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000008
Ecx = 00D96DD8 Esi = 00A0B080
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000008 Dr6 = 00D96DD8
Dr2 = 00000000 Dr7 = 00000000
 
Ad

Advertisements

R

Ronald Laeremans [MSFT]

Hi Jonathan,

The lead for the linker team looked at the dump info you provided and we
think it may be related to an issue we fixed for the release we are
currently working on that addresses an issue when new imports get added and
that mainly hits when we are linking very large images like in your case. We
are within a few months of releasing the first public drop of that version
(not a Beta, but a less tested version called a community drop). If you
could try your scenario with that compiler, we could determine whether that
indeed addresses your issue and if it doesn't we could work with you to see
what is up in more detail.

Apart from not ever adding any imports between incremental links or
splitting up your images into smaller ones, I couldn't find a real
workaround if it is indeed this issue you are hitting.

Ronald Laeremans
Visual C++ team

Jonathan Payne said:
Sorry to post this again. I didn't get any responses the previous time I
posted and I really would appreciate an answer.



Even if someone could just acknowledge that this is a bug and/or give me a
few clues as to what factors I could change to reduce this problem.



I am getting these linker errors even more frequently now (today they
started occurring after about three builds after a complete rebuild).



It should be quite easy for someone to search for LNK1000 in a bugs database
or to have a look at the debug files for the linker to see what code is at
eip in the register dumps.



I am happy to try and extract any other debug information that you might
need.



Original post ->



I am having some problems with the linker and I was wondering if anyone had
any suggestions. I am working on a large project (the main .exe file is
around 7 mb release, 14 mb debug) and after building a number of debug
builds I get a linker error (see below).

I do a complete clean and rebuild every evening so I have a fresh build by
the morning. By early afternoon (after perhaps 20 or so incremental
builds), I start seeing the linker errors and once they start occurring, I
get them roughtly every other time I build until I do a full rebuild.

The following knowledge base articles seem to detail similar problems but
for the 2002 edition of the compiler (I am using Visual Studio 2003):

http://support.microsoft.com/default.aspx?kbid=329593
http://support.microsoft.com/default.aspx?scid=kb;en-us;826326

As these have updated link.exe files from after the 2003 release, I was
wondering if the fix was discovered after the 2003 release and if so, if
Microsoft has an equivalent fix for Visual Studio 2003. Is there a hot fix
I could get from Microsoft support?

Alternatively, are there any work arounds? I was wondering if deleting some
of the intermediate files and letting it do a full relink at lunch time each
day would help but I think it is already doing a full relink after the
linker crashes as the previous link failed (although I am thinking of
experimenting with deleting the .ilk files at lunch time).

Of course the other solution would be not to use incremental linking but I
would like to carry on using it if possible (as a full link takes much
longer).

Jonathan

Here are the error messages. I have collected a few but as they are all
almost identical I will only post a selection:

14:46 09/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 010240E7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000001
Ecx = 01023DE8 Esi = 00E25368
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000001 Dr6 = 01023DE8
Dr2 = 00000000 Dr7 = 00000000

14:54 09/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 010240E7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000001
Ecx = 01023DE8 Esi = 00E25368
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000001 Dr6 = 01023DE8
Dr2 = 00000000 Dr7 = 00000000

14:27 11/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 00D970D7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000008
Ecx = 00D96DD8 Esi = 00A0B080
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000008 Dr6 = 00D96DD8
Dr2 = 00000000 Dr7 = 00000000
 
Ad

Advertisements

J

Jonathan Payne

Thank you for taking the time to reply to my post.



I was wondering if you could give any more details on what limits we might
be hitting that could cause this error. As you say, it seems to happen when
linking very large images and the linker seems to be very reliable when
working on smaller projects. Is it the total size of the imported
libraries, the size of the object files in the current module, the number of
imported symbols or a combination of these? I would like to get a clear
idea of what is causing this problem so I can try and stop it occurring.



Currently the solution I am working on consist of 14 projects that are all
built to DLLs and each one contains an average of around 100 classes
exported using __declspec(dllexport). These are then used in the main
application module. We use this layout so we can share code between our
applications and to try and keep build times down. Currently the DLL
binaries are never shared between projects - each project will use its own
set of the library DLLs built at the time the project is released.



Are there any changes you could suggest that would help reduce the chances
of this error?



At the moment all of the projects have incremental linking turned on for
debug builds. I would like to continue using incremental linking with the
main application module as it saves a lot of time but I could disable it for
the libraries if that might help. Would turning off edit and continue help?



Would moving code out of the application into more DLLs help or would it be
more reliable if I were to reduce the number of imported libraries or use
static linking for some of them? Would reducing the number of symbols
exported from the DLLs be useful?



I have just found your post regarding ILK file size limits:

http://tinyurl.com/2nqfs

Although this is not the error message we are seeing, is it possible that
the /3GB switch and/or more memory might help?



I would be happy to test any new versions of the linker you may have to see
if the problem has been fixed and I can try and extract more debug
information if that would help.



Jonathan



Ronald Laeremans said:
Hi Jonathan,

The lead for the linker team looked at the dump info you provided and we
think it may be related to an issue we fixed for the release we are
currently working on that addresses an issue when new imports get added and
that mainly hits when we are linking very large images like in your case. We
are within a few months of releasing the first public drop of that version
(not a Beta, but a less tested version called a community drop). If you
could try your scenario with that compiler, we could determine whether that
indeed addresses your issue and if it doesn't we could work with you to see
what is up in more detail.

Apart from not ever adding any imports between incremental links or
splitting up your images into smaller ones, I couldn't find a real
workaround if it is indeed this issue you are hitting.

Ronald Laeremans
Visual C++ team

Jonathan Payne said:
Sorry to post this again. I didn't get any responses the previous time I
posted and I really would appreciate an answer.



Even if someone could just acknowledge that this is a bug and/or give me a
few clues as to what factors I could change to reduce this problem.



I am getting these linker errors even more frequently now (today they
started occurring after about three builds after a complete rebuild).



It should be quite easy for someone to search for LNK1000 in a bugs database
or to have a look at the debug files for the linker to see what code is at
eip in the register dumps.



I am happy to try and extract any other debug information that you might
need.



Original post ->



I am having some problems with the linker and I was wondering if anyone had
any suggestions. I am working on a large project (the main .exe file is
around 7 mb release, 14 mb debug) and after building a number of debug
builds I get a linker error (see below).

I do a complete clean and rebuild every evening so I have a fresh build by
the morning. By early afternoon (after perhaps 20 or so incremental
builds), I start seeing the linker errors and once they start occurring, I
get them roughtly every other time I build until I do a full rebuild.

The following knowledge base articles seem to detail similar problems but
for the 2002 edition of the compiler (I am using Visual Studio 2003):

http://support.microsoft.com/default.aspx?kbid=329593
http://support.microsoft.com/default.aspx?scid=kb;en-us;826326

As these have updated link.exe files from after the 2003 release, I was
wondering if the fix was discovered after the 2003 release and if so, if
Microsoft has an equivalent fix for Visual Studio 2003. Is there a hot fix
I could get from Microsoft support?

Alternatively, are there any work arounds? I was wondering if deleting some
of the intermediate files and letting it do a full relink at lunch time each
day would help but I think it is already doing a full relink after the
linker crashes as the previous link failed (although I am thinking of
experimenting with deleting the .ilk files at lunch time).

Of course the other solution would be not to use incremental linking but I
would like to carry on using it if possible (as a full link takes much
longer).

Jonathan

Here are the error messages. I have collected a few but as they are all
almost identical I will only post a selection:

14:46 09/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 010240E7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000001
Ecx = 01023DE8 Esi = 00E25368
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000001 Dr6 = 01023DE8
Dr2 = 00000000 Dr7 = 00000000

14:54 09/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 010240E7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000001
Ecx = 01023DE8 Esi = 00E25368
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000001 Dr6 = 01023DE8
Dr2 = 00000000 Dr7 = 00000000

14:27 11/03/2004
LINK : fatal error LNK1000: Internal error during Pass2

Version 7.10.3077

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 0044A956 (00400000) "C:\Program Files\Microsoft
Visual Studio .NET 2003\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000000
ExceptionInformation[ 1] = 00D970D7
CONTEXT:
Eax = 000002FF Esp = 0012F2C8
Ebx = 3FFF0338 Ebp = 00000008
Ecx = 00D96DD8 Esi = 00A0B080
Edx = 0000028F Edi = 0000028F
Eip = 0044A956 EFlags = 00010206
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F2C8 Dr3 = 3FFF0338
Dr1 = 00000008 Dr6 = 00D96DD8
Dr2 = 00000000 Dr7 = 00000000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

LINKER error 0
Linker error 1
Linker Error 4
Linker error 0
Linker Error 4
Linker error 0
Linker error 3
Linker Error 0

Top