diff options
author | Alan Modra <amodra@gmail.com> | 2022-12-18 13:04:13 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-12-18 19:11:32 +1030 |
commit | 20d8836e4ac6e416fda53152d453328934a2ea46 (patch) | |
tree | a2f1521f30f38d98b36cb59b3feb581ee2e3252e /bfd/section.c | |
parent | 3bbdb440d0eb9333c969e87d75996011bcdc9aff (diff) | |
download | gdb-20d8836e4ac6e416fda53152d453328934a2ea46.zip gdb-20d8836e4ac6e416fda53152d453328934a2ea46.tar.gz gdb-20d8836e4ac6e416fda53152d453328934a2ea46.tar.bz2 |
Comment bfd_get_section_limit_octets and bfd_get_section_alloc_size
* bfd.c (bfd_get_section_limit_octets): Add comment.
(bfd_get_section_alloc_size): Likewise.
* libbfd.c (_bfd_generic_get_section_contents): Use
bfd_get_section_limit_octets.
* section.c (bfd_get_section_contents): Likewise.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/section.c')
-rw-r--r-- | bfd/section.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bfd/section.c b/bfd/section.c index a49778e..893fc91 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -1550,10 +1550,7 @@ bfd_get_section_contents (bfd *abfd, return true; } - if (abfd->direction != write_direction && section->rawsize != 0) - sz = section->rawsize; - else - sz = section->size; + sz = bfd_get_section_limit_octets (abfd, section); if ((bfd_size_type) offset > sz || count > sz - offset || count != (size_t) count) |