X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=apOvBx4oTTDzoHICf6FoY5nTXH2YSaQGUGFD3nACguE=; b=ym3K6xQjuIAfoHS1I/H9hsN67IoUw6SvznyWhi5ygUwSA5uZz/zaLblORW9nZyq305 MKRyykViLdhhvHG+WiYX6nVvMFlZOFB4U5ydbPtUiw6ZaCjKMjSfMgWzksZI2mJShTz9 LlsFvnK1uF60CAVYc/hf5N2Yxn+SSD+UieZIxx6IhjPsQV0BmrW3IeObRZjUIW471pG8 p1SSAe6Zx4fIX0mFdPqoFYjGgaaktPmzt1KkdxuY+8L4Z4vfN8sOqrA8kV0lqnxdaOmG mK/C9OWt4L0QMh5c1Spw21zXX6X8tiauK8+yKwj4B4SUIlqn9tjDsZLBRyEYV3PS1Yxh NiqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=apOvBx4oTTDzoHICf6FoY5nTXH2YSaQGUGFD3nACguE=; b=gCyO5IS3D6sjD4MstkHW6qQcxd6gg0T+Hefxdhw4rJIK9ZlWC7VJySXk6V70WCyjpE oVX18hx15taTJq3W2ePIC2Zwv5AdU/qibhwRWVbVf28iOV1GyauIPXzRocmnCcGWicW6 73Eolsp5pPBm8+8pITA39000HMWbJXgY9TV03L6MCbqXFuSlZBSTUfDiLvr5Xu1ESsj0 i+2Kbx/dru7T8pq72X/k2E/ppgp5VB2AowbdtfTd0FL6JLOyTjL/lCH5cmgvdeeMyAj4 0mtbd3oHCq0V89MAnHh8Ns4ww5wvcutbOX3JfEsWTfiDgBAKOBFPE7/yPjnKUhuncG/A QE2g== X-Gm-Message-State: AEkoouvrmbwhkji4GuAjDJDoEnUu9TgvSyRcNx3J2m3ormR5027dfbfIkUaSaMdspfoOJia8Z1VEg+G3UZ3Jtw== X-Received: by 10.107.59.7 with SMTP id i7mr4739384ioa.190.1469193122152; Fri, 22 Jul 2016 06:12:02 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1dc4b273-bfe4-4d67-8af6-2e293a4fcb58@googlegroups.com> References: <1dc4b273-bfe4-4d67-8af6-2e293a4fcb58 AT googlegroups DOT com> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Fri, 22 Jul 2016 16:12:01 +0300 Message-ID: Subject: Re: LD from binutils 2.26 crashes when -ffunction-sections + -Wl,--gc-sections is used but only under DOS To: djgpp AT delorie DOT com Content-Type: text/plain; charset=UTF-8 Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 7/22/16, RayeR (glaux AT centrum DOT cz) [via djgpp AT delorie DOT com] wrote: >> It segs in fini_reloc_cookie_rels() because (sec)->used_by_bfd is NULL > > So you mean that it is rather binutils (djgpp coff) generator code problem > than djdev? > Yes. (And why would djdev fail on a dos os?? That would defeat its very own purpose.) The following alternative patch works too, but like before it might be the wrong way of fixing this. diff -urNp binutils-2.26/bfd/coffgen.c.orig binutils-2.26/bfd/coffgen.c --- binutils-2.26/bfd/coffgen.c.orig 2015-11-13 10:27:40.000000000 +0200 +++ binutils-2.26/bfd/coffgen.c 2016-07-22 11:41:02.000000000 +0300 @@ -2688,7 +2688,7 @@ static void fini_reloc_cookie_rels (struct coff_reloc_cookie *cookie, asection *sec) { - 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)) free (cookie->rels); } >>Juan Manuel Guerrero: "But who one cares about MSDOS or FreeDOS if he has >> the pleasure of NTVDM ? Me certainly not; I do 100% of my DJGPP >> development on WinXP." > Then what is the point to use DJGPP at all Indeed. -- O.S.