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=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=1HdzZneB4u9ZUDE8slH/cBTiMJiagCqZFvoUFMGspLA=; b=ee5KGGpGjgAjBmj2zrT51Yo8zXVzmAo1xzFNPjpDKDnjO9cPxPNMLpQ8Udsv9kR5mv yU/T6KS1HcyyrlVljEEeYPJ+vxI1qmIUEGf0Xae1NceesWJhrWkHnG/vp7zU/FQrY9iM er4c9admgtDtfIMpRyUPAw2jh/QURiyefoGICWAwqqPkTGsOTmwUYj6+9ZCKo8i2IeQQ qxxQ7JvwrwK2bUd2GuT3tkvclgjcsoB39LGyJBxKZoz9Md6m2q6qTdQETAmAHsN0Vmdu VlsLWsg+PLFReUsukKXv0zqBbTcEwcyH0hjUMWiRWNC0IRDS7UyuSyzkWDpVV6Tf9TMt BPjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=1HdzZneB4u9ZUDE8slH/cBTiMJiagCqZFvoUFMGspLA=; b=TViS9ZEkLRs944Vjfgd+SCoX6vZ8ZBLHzMXEmk9Z2voBZOhsWsW2J+cGw+Oza9r8pz QdfPoWLvkRySwfVzBM9KCB3M3dwl6DRb02V4ChlEW8M+Q5wblqwISPW6GgEMQb785qoM C17ZHQEtyvukM2uyPkyIDtDrLZYqbeWZUNduC97cLINYGrL3zrereCAnTudiThCMVWQ5 zF4sZmZ4KZ9vAA8AYGdYlI+XlBwFa8lXO0vq/m2RskKoTDXR5/Sg/JuJHHth5knqdjyh WchH22CdZNr7uWLB6gGg7GI/HvnFndNVCanvaHT3sXL/yagmL7mEhv1TDif0xddngvyp V7Ag== X-Gm-Message-State: AEkooutu/qK8F5/iEMn5Xw3N0QhyOrgs2eG4/Tf+euTfJlDq5oG4Pr2VtHpu9qeWxXLpSw== X-Received: by 10.55.43.229 with SMTP id r98mr2019735qkr.62.1469155756337; Thu, 21 Jul 2016 19:49:16 -0700 (PDT) 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 References: <579167F3 DOT 4060700 AT gmx DOT de> From: "Frank Sapone (emoaddict15 AT gmail DOT com) [via djgpp AT delorie DOT com]" Message-ID: Date: Thu, 21 Jul 2016 22:49:14 -0400 User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 DJGPP may seem dead or irrelevant but in the past 5-6 years it piqued my interest in using my old DOS computer, getting it online (something I never did in the 90s) and then started hacking at quake, quakeworld and eventually quake 2 with DJGPP with the help of neozeed and sezero to backport these titles with WATTCP and greatly expand on their featuresets. And even though the userbase is very limited, it's something that I'm proud that I was able to accomplish and is usable on a real DOS computer. Even on newer ones. And it even works under NTVDM if you're truly lazy (obviously no sound, etc. but still interesting to see it function). I don't expect any new heavy features and I do suspect someday in the next 10 years some kind of large change will prevent DJGPP from continuing forward with GCC updates, but this is OK as the current state is able to build complex projects like the ones I have worked on and they work properly. Frank On 7/21/2016 9:34 PM, rugxulo AT gmail DOT com [via djgpp AT delorie DOT com] wrote: > Hi, > > On Thursday, July 21, 2016 at 7:25:10 PM UTC-5, Juan Manuel Guerrero (juan DOT guerrero AT spam DOT sux) [via djgpp AT spam DOT sux] wrote: >> Am 21.07.2016 19:55, schrieb RayeR (glaux AT spam DOT sux) [via djgpp AT spam DOT sux]: >> >> 1) I would never claim that a DJGPP port of binutils is able to run >> on plain DOS at all. I have never tried and I am surprised that some >> one has tried. > I know you always disclaim, saying that you don't know how well it works > in FreeDOS. I also know that you sometimes rarely use native DOS in a VM. > I also know you prefer NTVDM (which I don't have available anymore). > > I have a native FreeDOS FAT32 partition that I often use for fun. No, I > obviously don't do anything fancy there, no heavy work, but I do sometimes > run DJGPP. My current install is DJDEV 2.05, GCC 6.10, and BinUtils 2.26r3. > At least for my uses it works fine. > >> 2) I do not know how well COFF is still supported by the binutils >> maintainers. I do not know if there is still a COFF devoted maintainer >> at all and it is no secret that from time to time they break COFF >> support without note it until some of the last COFF users complains. > Last I checked, DJ was still the COFF maintainer. But it's not truly fair > to expect him to do any heavy (or really any) maintenance as he has other > priorities. So if he doesn't want to do it, we have to respect his decision. > > Again, maybe in theory it would be wiser to switch to ELF, but so far there > isn't enough interest (or energy) to do it. > >> I think there is no need to clarify that PECOFF has no real relation >> to the standard 32-bit COFF from the good old days and that if they >> support PECOFF for cygwin/mingw this does not imply in any way that >> they are still maintaining COFF. > Cygwin and MinGW are still "tier two" while DJGPP isn't even on the map. > Maybe they throw us a bone every so often, I dunno, but DJGPP overall > is not important enough (anymore), sadly. > >> > But when I run it under Win98SE or WinXP it compiles fine and EXE >> > is valid. So I tried some older linker and found that LD.EXE from >> > binutils 2.25 dated 1.6.2015 and some olders that I tried don't crash. >> > So it was introduced recenlty in 2.26. >> >> What you are discribing is that the DJGPP port of binutils 2.25 works on >> plain DOS because that was the absolute last port for which I have provided >> a version compiled with DJGPP 2.03. All later ports are only availabe as >> compiled either with DJGPP 2.04 or with DJGPP 2.05. And it is absolute >> __NO__ surprise that ports compiled with DJGPP 204 and/or DJGPP 2.05 work >> flawlessly in a NTVDM environment but may crash on plain DOS. This is a >> very well known fact for the last 10 years probably. > I'm aware that NTVDM was more convenient, but most things (AFAIK) were not > explicitly broken, nor were they meant to be. Sure, LFNs were needed to > build some stuff, but I'm not aware of any overt incompatibility. That was, > IMHO, an advantage of DJGPP, that it worked in as many environments as > possible. > >> Most of the developers that have made the great job to get DJGPP working >> on Win98 and later on Win2K and WinXP had probably no longer access to >> MSDOS machines so it was impossible for them to check if those >> improvements done had broken some old plain DOS support. > XP didn't come with DOS anymore, maybe only a system floppy, and that was > bare bones and lacked a lot of stuff (including SYS). Besides, you couldn't > shrink / resize your NTFS until Vista, which itself wouldn't even boot off > of FAT anymore. (Win7 still has system floppy, but I hear that Win10 doesn't.) > > Nevertheless, there's always FreeDOS (and VMs, e.g. QEMU/KVM or VBox), > which does mostly work. Actually, MSDN probably still sells MS-DOS, Win 3.1, > etc. (dunno, don't care, haven't looked). Certainly ROM-DOS and DR-DOS are > still sold online. > >> 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. > XP has been dead since, what, April 2014? No more fixes, no more updates. > All 64-bit versions of Windows lack NTVDM entirely. AFAIK, even Win8.1 and > Win10 both require a late-model P4 due to NX bit. So the writing is on the > wall. Yes, Win10 32-bit still supports NTVDM, allegedly, but there probably > won't be any going forward. No idea if Hyper-V properly supports DOS, even > accidentally, but I wouldn't rely on it. VPC is probably dead. > >> The bottom line of all this is that no DJGPP port of binutils has ever >> been broken. What we are experiencing here is a DJGPP 2.05 issue and >> nothing else. > I'm not so sure. > >> You can check your code with both versions of the linker and see what >> happens. In the end it is your job to provide minimal sample code that >> makes it possible to me to reproduce this issue so I can debug the >> library to see where to fix the issue. Fixing this may take weeks or >> months depending on my free time and interest. > In this newsgroup, on Feb. 2 (under Subject: "Re: ANNOUNCE: Update of > DJGPP port of gcc-5.3.0"), I had also said this: > > " > Well, just for comparison, I tried older GCC 4.9.3 and BinUtils 2.26: > It builds and works okay, but only if you remove the unsupported > "-Wl,--gc-sections" in e3d.gpr (which otherwise crashes the linker). > " > > But in private email (June 22) to Gautier: > > " > I have no idea when or why this was broken, but I can't reproduce > this with latest BNU226BR3.ZIP (r3, March 5, 2016) from > /current/v2gnu/ , so my warning is probably (now) irrelevant. Just > FYI. > " > > So, indeed, I can rebuild "Engine 3D" with no crashes (in raw FreeDOS) > with latest DJGPP (either 4.9.3 or 6.1.0). Heck, I recently made this > a "test[s]" in my MetaDOS (FreeDOS floppy, 0.4-pre unreleased). I've > barely mentioned my efforts before, but so far nobody cared. (Probably > too much other stuff to do.) > > Just FYI, FreeDOS recently released kernel 2042. It does allegedly fix > the read-from-NUL bug, but then again, he also accidentally broke / > regressed "if exist g:\blah\nul echo Exists!", so that's annoying. Hence > I'm still sticking to (very-mildly-patched) 2041 (although patching 2042 > probably isn't hard). I still have not tried to rebuild DJLSR205 yet > (although it should work). > > I know none of this is giving much hope, but anyways ....