https://sourceware.org/bugzilla/show_bug.cgi?id=29389
--- Comment #21 from Nick Clifton <nickc at redhat dot com> --- Created attachment 14250 --> https://sourceware.org/bugzilla/attachment.cgi?id=14250&action=edit Proposed Patch Hi Luca, Please could you try out the uploaded patch which *might* fix the problem. The patch does a few things. Firstly it "fixes" bfd_set_filename() so that it will fail if the bfd has been closed by file caching. Plus if the bfd is currently open, it will mark it as uncacheable, so that a future cache close/reopen sequence will not run into the problem you have encountered. Next the patch updates the calls to bfd_set_filename in the PE specific code, so that if they fail a slightly more helpful error message is generated. (It is not really enough to help a user who is not familiar with the linker however. Any suggestions for better wording would be gratefully appreciated). Finally it adds a (unused) call to bfd_stat() just before the call to bfd_set_filename(), so that the file will be reopened if it has been cached. (Arguably it would better if bfd_set_filename() just re-opened the file instead, rather than failing the rename. That would eliminate the need for a bogus stat() call). Anyway, give it a whirl and see how it goes. I am still testing the patch locally, so I may uncover some problems myself as well. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.