[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/20401] segfault in fini_reloc_cookie_rels() with --gc-sections

From: sezeroz at gmail dot com
Subject: [Bug ld/20401] segfault in fini_reloc_cookie_rels() with --gc-sections
Date: Mon, 25 Jul 2016 11:14:49 +0000


--- Comment #2 from Ozkan Sezer <sezeroz at gmail dot com> ---
(In reply to Nick Clifton from comment #1)
> Hi Ozkan,
> > We ran into a segfault with the djgpp port of ld in fini_reloc_cookie_rels()
> Would it be possible for you to upload a small testcase that reproduces this
> problem ?

Well, that's super easy:

$ cat test.c
int main () { return 0; }
$ i586-pc-msdosdjgpp-gcc -Wl,--gc-sections test.c
collect2: ld terminated with signal 11 [Segmentation fault]

> > -  if (cookie->rels && coff_section_data (NULL, sec)->relocs != 
> > cookie->rels)
> > +  if (cookie->rels && (!coff_section_data (NULL, sec) || coff_section_data
> > (NULL, sec)->relocs != cookie->rels))
> This is certainly a reasonable first step, but we ought to find out why the
> coff_section_data is NULL.  Probably the linker garbage collection has
> deleted the section, but it would be nice to confirm this.

Yes, as I said mine is just a workaround the seg.  I don't know how I
can find the root cause of it.  If you want me to run tests, I can do

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]