From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Clifton To: dj@delorie.com Cc: cwilson@ece.gatech.edu, binutils@sourceware.cygnus.com Subject: Re: binutils-20000625 ld.exe --shared broken Date: Fri, 07 Jul 2000 10:16:00 -0000 Message-id: <200007071716.KAA17515@elmo.cygnus.com> X-SW-Source: 2000-07/msg00092.html Hi Guys, : No, I think that code is right. Normally, when an archive is created, : the member BFDs are read from disk, and written to the archive's disk : file. Thus, they must be in read mode to be read from the disk. I : don't think this test is testing the writability of the archive : members, because it hasn't created them yet. So, I think the right : thing to do is make sure that pe_dll_generate_implib switches all the : member bfds it creates from write mode (when it creates them) to read : mode (so it can store them in the archive). I agree with DJ, although I must confess I had to read the explanation and look through the code a couple of times before understanding what is going on. I belive that the [not writable] test in _bfd_write_archive_contents() is there because up until this point none of the archive contents should have been written out, so there should be no reason for the archive memeber to have the writeable attribute. (Adding a comment to this effect in the code would be a good idea). Cheers Nick