Bug 324 - [i386-interix3] ld segfault
Summary: [i386-interix3] ld segfault
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-13 14:52 UTC by Kaz Sasayama
Modified: 2004-08-18 09:44 UTC (History)
1 user (show)

See Also:
Host: i386-pc-linux-gnu
Target: i386-pc-interix3
Build: i386-pc-linux-gnu
Last reconfirmed:


Attachments
My change to avoid segfaults (244 bytes, patch)
2004-08-13 15:18 UTC, Kaz Sasayama
Details | Diff
Test for initialised comdat field in coff section data structure before using it (343 bytes, patch)
2004-08-18 09:41 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kaz Sasayama 2004-08-13 14:52:08 UTC
For i386-interix3 target (even in a cross configuration), ld segfaults at
peigen.c line 2050, where h1->root.u.def.section is null.  Has nobody tried this
configuration?
Comment 1 Kaz Sasayama 2004-08-13 15:18:25 UTC
Created attachment 162 [details]
My change to avoid segfaults

I made this change to avoid segfaults, while this configuration still does not
link programs correctly.
Comment 2 Nick Clifton 2004-08-18 09:41:18 UTC
Created attachment 169 [details]
Test for initialised comdat field in coff section data structure before using it
Comment 3 Nick Clifton 2004-08-18 09:44:27 UTC
Hi,

  Actually this appears to be a simple case of a test using the comdat field in
the coff section data structure when that field has not been initialised.  I am
applying the attached patch to fix this problem.

Cheers
  Nick

bfd/ChangeLog
2004-08-18  Nick Clifton  <nickc@redhat.com>

	PR 324
	* cofflink.c (coff_link_add_symbols): Check that the comdat
	pointer in the coff_section_data structure has been initialised
	before using it.