[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/21679] bfd_get_file_size should be cached for readonly file
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/21679] bfd_get_file_size should be cached for readonly file |
Date: |
Tue, 27 Jun 2017 02:45:36 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21679
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(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 to return a count less than expected.
For corrupted object files, the section offset and size may be incorrect.
The check is supposed to prevent reading beyond the end of file. If it
can be done in a different way to avoid calling bfd_get_file_size, we
should change it.
--
You are receiving this mail because:
You are on the CC list for the bug.