[Bug ld/21679] bfd_get_file_size should be cached for readonly file

2017-06-28 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21679 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug ld/21679] bfd_get_file_size should be cached for readonly file

2017-06-26 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21679 --- Comment #3 from Alan Modra --- My point is that you *can't* read beyond the end of an object file, unless it is inside an archive. So you only need to check archives, and the archive check doesn't call fstat. -- You are receiving this m

[Bug ld/21679] bfd_get_file_size should be cached for readonly file

2017-06-26 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21679 --- Comment #2 from H.J. Lu --- (In reply to Alan Modra from comment #1) > Is there a good reason for bfd_get_file_size to be called before reading > sections? Only for archives, I'd guess. For object files, you can just > wait for the read

[Bug ld/21679] bfd_get_file_size should be cached for readonly file

2017-06-26 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21679 Alan Modra changed: What|Removed |Added CC||amodra at gmail dot com --- Comment #1 f