Absolute paths in BFD
Eli Zaretskii
eliz@delorie.com
Fri Apr 28 15:47:00 GMT 2000
> If I copy foo.a from an ELF system to DOS, and foo.a contains Bar.o,
> and I do `ar r bar.o' should it replace Bar.o or not? I'm not sure.
IMHO, it _should_ replace Bar.o with bar.o. I can think of several
reasons, here are two of them:
- Bar.o and bar.o together cannot exist on a case-insensitive
filesystem. If you extract Bar.o, it overwrites bar.o, and vice
versa. So it doesn't make sense to keep the two modules in the
archive, it will only create confusion and can never be useful, as
long as the archive resides on a monocase filesystem.
- Far more frequent than the hypothetical case you mentioned is the
situation where the same file is submitted to ar using different
letter-case in its name. The filesystem doesn't care whether you
say bar.o or Bar.o or BaR.o, it will behave as if all of those
existed. It is wrong for ar to treat these names as 3 different
files. (You might wonder who in their right mind would tweak file
names like that, but in fact this could happen without any user
sanction, just because different tools used on DOS/Windows feel
themselves at liberty to change letter-case in file names at will.)
Btw, this issue has nothing to do with support for DOS-style absolute
file names in ar. This is a different issue.
More information about the Binutils
mailing list