summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/bfd-in2.h3
-rw-r--r--bfd/bfd.c8
3 files changed, 14 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d8068c48c0f..bcbe0e16655 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-29 Andrew Stubbs <ams@codesourcery.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/19020
+ * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
+ * bfd-in2.h: Regenerated.
+
2015-08-11 Peter Zotov <whitequark@whitequark.org>
PR ld/18759
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index f06d76e430d..0d096f9034e 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -6933,7 +6933,8 @@ bfd_size_type bfd_convert_section_size
(bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size);
bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_byte **ptr);
+ (bfd *ibfd, asection *isec, bfd *obfd,
+ bfd_byte **ptr, bfd_size_type *ptr_size);
/* Extracted from archive.c. */
symindex bfd_get_next_mapent
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 449dfe610da..f68f665d9c7 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2165,19 +2165,20 @@ FUNCTION
SYNOPSIS
bfd_boolean bfd_convert_section_contents
- (bfd *ibfd, asection *isec, bfd *obfd, bfd_byte **ptr);
+ (bfd *ibfd, asection *isec, bfd *obfd,
+ bfd_byte **ptr, bfd_size_type *ptr_size);
DESCRIPTION
Convert the contents, stored in @var{*ptr}, of the section
@var{isec} in input BFD @var{ibfd} to output BFD @var{obfd}
if needed. The original buffer pointed to by @var{*ptr} may
be freed and @var{*ptr} is returned with memory malloc'd by this
- function.
+ function, and the new size written to @var{ptr_size}.
*/
bfd_boolean
bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
- bfd_byte **ptr)
+ bfd_byte **ptr, bfd_size_type *ptr_size)
{
bfd_byte *contents;
bfd_size_type ihdr_size, ohdr_size, size;
@@ -2264,5 +2265,6 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
*ptr = contents;
}
+ *ptr_size = size;
return TRUE;
}