aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-12-18 13:04:13 +1030
committerAlan Modra <amodra@gmail.com>2022-12-18 19:11:32 +1030
commit20d8836e4ac6e416fda53152d453328934a2ea46 (patch)
treea2f1521f30f38d98b36cb59b3feb581ee2e3252e /bfd/bfd.c
parent3bbdb440d0eb9333c969e87d75996011bcdc9aff (diff)
downloadbinutils-20d8836e4ac6e416fda53152d453328934a2ea46.zip
binutils-20d8836e4ac6e416fda53152d453328934a2ea46.tar.gz
binutils-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/bfd.c')
-rw-r--r--bfd/bfd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 97ce2b1..e1759ed 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -502,6 +502,8 @@ CODE_FRAGMENT
. sy->name = name;
.}
.
+.{* For input sections return the original size on disk of the
+. section. For output sections return the current size. *}
.static inline bfd_size_type
.bfd_get_section_limit_octets (const bfd *abfd, const asection *sec)
.{
@@ -518,6 +520,9 @@ CODE_FRAGMENT
. / bfd_octets_per_byte (abfd, sec));
.}
.
+.{* For input sections return the larger of the current size and the
+. original size on disk of the section. For output sections return
+. the current size. *}
.static inline bfd_size_type
.bfd_get_section_alloc_size (const bfd *abfd, const asection *sec)
.{