delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/21/07:10:35

Date: Tue, 21 Oct 1997 13:08:03 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Possible bug relating to floppy drives and strip.exe
In-Reply-To: <628vq8$bki$2@news.ox.ac.uk>
Message-ID: <Pine.SUN.3.91.971021130741.3667G-100000@is>
MIME-Version: 1.0

On 18 Oct 1997, George Foot wrote:

> I recently happened to compile a program, copy it to floppy, and then attempt
> to strip the debugging symbols from the floppy disk version. Here's what
> happens:
> 
> C:\>strip a:a.exe
> c:/djgpp201/bin/strip.exe: a:a.exe: rename: Improper link (EXDEV)

I assume this is `strip' from Binutils 2.7 (since you say it's from
stock DJGPP 2.01).  If so, this is a known bug which I reported to
Robert Hoehne ages ago.  You might try this with the latest Binutils
2.8.1 (I don't have them installed) and see if it is corrected there.

Btw, the problem is not related to floppies at all, it will pop up
always when you try to strip a file on another drive.  For example, if
you have C: and D:, try "strip d:foo.exe" while your current drive is
C:, and you will see the same message.

It seems that the reason is that `strip' treats file names like
"d:foo" as relative rather than absolute, while "d:/foo" is treated as
absolute.  This is one of the problems with porting Unix software to
MS-DOS/MS-Windows: Unix code always assumes that anything which
doesn't begin with a '/' is a relative file name.  You need to add
code that knows about "d:/foo", "d:\foo" and "d:foo" as well; if you
fail to do that, you get a broken port.

(Now you can appreciate how hard it is to port file-related programs
like GNU Fileutils and GNU tar, to DOS, whose entire operation is
around taking file names apart.  See the sources for some tricks that
alleviate some of these woes.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019