aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/section.c b/bfd/section.c
index ef7a7e6..38683fc 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -1081,6 +1081,11 @@ bfd_set_section_contents (abfd, section, location, offset, count)
break;
}
+ /* Record a copy of the data in memory if desired. */
+ if (section->contents
+ && location != section->contents + offset)
+ memcpy (section->contents + offset, location, count);
+
if (BFD_SEND (abfd, _bfd_set_section_contents,
(abfd, section, location, offset, count)))
{