This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ar breaking with "No error"
- From: Arnd-Hendrik Mathias <arnd-hendrik dot mathias at nefkom dot net>
- To: binutils at sourceware dot org
- Date: Mon, 13 Apr 2009 23:37:22 +0200
- Subject: ar breaking with "No error"
Hi,
could anyone explain me what the code section below, cited from
binutils-2.19.1/binutils/ar.c line 713 (in function open_inarch) is
about? I encounter the problem, that using my newly built binutils ar
like this
.../x86_64-temp-linux-gnu-ar rc my.a my.o
generates this output.
.../x86_64-temp-linux-gnu-ar: my.a: No error
while aborting.
I debugged it with gdb and found out, that I come into this bfd_fatal call.
Obviously, before creation of the new archive ENOENT is a correct value
for errno after the stat (...) call, but as far as I can see, aborting
with bfd_fatal (...) should only happen if the value of "silent_create"
(set with command line flag c) is zero.
So, why is this piece of code there, anyway?
Best regards
A.-H.
Code citation:
#if !defined(__GO32__) || defined(__DJGPP__)
/* FIXME: I don't understand why this fragment was ifndef'ed
away for __GO32__; perhaps it was in the days of DJGPP v1.x.
stat() works just fine in v2.x, so I think this should be
removed. For now, I enable it for DJGPP v2. -- EZ. */
/* KLUDGE ALERT! Temporary fix until I figger why
stat() is wrong ... think it's buried in GO32's IDT - Jax */
if (errno != ENOENT)
bfd_fatal (archive_filename);
#endif