Bug 6962 - ld fails in coffcode.h line 842 in handle_COMDAT
Summary: ld fails in coffcode.h line 842 in handle_COMDAT
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.20
: P1 critical
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-14 15:01 UTC by Jean-Marie Chudyba
Modified: 2014-06-20 15:00 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
part of the gcc/libsupc++ (10.79 KB, application/octet-stream)
2010-10-27 08:20 UTC, Pawel Sikora
Details
Only check the base type when looking for a section symbol (288 bytes, patch)
2010-10-29 11:11 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Marie Chudyba 2008-10-14 15:01:16 UTC
g++ -L"C:\users\BossV70\CPPProject\Debug" -Wl,--add-stdcall-alias -shared
-o"CPPWrapperProject.dll"  ./wrappercode.o   -lCPPProject
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: BFD (GNU
Binutils) 2.18.50.20080625 internal error, aborting at
/netrel/src/binutils-20080624-2/bfd/coffcode.h line 842 in handle_COMDAT

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: Please
report this bug.
Comment 1 Nick Clifton 2008-10-22 14:31:34 UTC
Subject: Re:  New: ld fails in coffcode.h line 842 in handle_COMDAT

Hi Jean-Marie,

   Please could you upload a small testcase so that we can reproduce 
this bug and investigate how to fix it ?

Cheers
   Nick


Comment 2 Pawel Sikora 2010-10-27 08:20:47 UTC
Created attachment 5089 [details]
part of the gcc/libsupc++

$ i686-pc-mingw32/bin/ar rc libsupc++convenience.a eh_alloc.o

BFD: BFD (Linux/GNU Binutils) 2.20.51.0.12.20101020 internal error, aborting at coffcode.h line 961 in handle_COMDAT
BFD: Please report this bug.
Comment 3 Nick Clifton 2010-10-29 11:11:05 UTC
Created attachment 5099 [details]
Only check the base type when looking for a section symbol
Comment 4 Nick Clifton 2010-10-29 11:12:34 UTC
Hi Pawel,

  Thanks very much for uploading that test file.  With it was able to reproduce the problem and I think that I have found a fix.  Please would you try out the uploaded patch and let me know if it works for you ?

Cheers
  Nick
Comment 5 Pawel Sikora 2010-10-29 12:03:15 UTC
(In reply to comment #4)
> Hi Pawel,
> 
>   Thanks very much for uploading that test file.  With it was able to reproduce
> the problem and I think that I have found a fix.  Please would you try out the
> uploaded patch and let me know if it works for you ?
> 
> Cheers
>   Nick

with this patch i'm able to build {i686,x86_64}-pc-mingw32-g++.
Comment 6 Nick Clifton 2010-10-29 13:21:45 UTC
Hi Pawel,

  Great - in which I will check the patch in:

http://sourceware.org/ml/binutils/2010-10/msg00507.html

Cheers
  Nick
Comment 7 Shweta 2014-06-20 13:41:34 UTC
Hi Nick,

I am also getting the same error. You have given patch file. Can you please help me where to place this file and fix this bug?

Please help me out.
Comment 8 Nick Clifton 2014-06-20 15:00:59 UTC
Hi Shweta

> I am also getting the same error. You have given patch file. Can you please 
> help me where to place this file and fix this bug?

The patch file includes information about where it should be placed - in this case the file bfd/coffcode.h.  But you should not need to apply it yourself - the patch has already been checked in to the binutils sources.  Unless you are using an old set of the sources, in which case I would recommend upgrading to a newer set.

Cheers
  Nick