OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains4x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e26643b
)
Zero the allocated contents of reloc sections.
author
Nick Clifton
<nickc@redhat.com>
Thu, 27 Jul 2000 22:35:08 +0000
(22:35 +0000)
committer
Nick Clifton
<nickc@redhat.com>
Thu, 27 Jul 2000 22:35:08 +0000
(22:35 +0000)
bfd/ChangeLog
patch
|
blob
|
history
bfd/elflink.h
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index
3691737
..
5e4dd24
100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-1,3
+1,8
@@
+2000-07-27 Nick Clifton <nickc@cygnus.com>
+
+ * elflink.h (elf_link_size_reloc_section): Zeroes the section's
+ allocated contents.
+
2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
* configure.host (*-*-aix*): AIX has 'long long' always.
2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
* configure.host (*-*-aix*): AIX has 'long long' always.
diff --git
a/bfd/elflink.h
b/bfd/elflink.h
index
10cf2ae
..
6b91d31
100644
(file)
--- a/
bfd/elflink.h
+++ b/
bfd/elflink.h
@@
-4013,8
+4013,10
@@
elf_link_size_reloc_section (abfd, rel_hdr, o)
rel_hdr->sh_size = rel_hdr->sh_entsize * reloc_count;
/* The contents field must last into write_object_contents, so we
rel_hdr->sh_size = rel_hdr->sh_entsize * reloc_count;
/* The contents field must last into write_object_contents, so we
- allocate it with bfd_alloc rather than malloc. */
- rel_hdr->contents = (PTR) bfd_alloc (abfd, rel_hdr->sh_size);
+ allocate it with bfd_alloc rather than malloc. Also since we
+ cannot be sure that the contents will actually be filled in,
+ we zero the allocated space. */
+ rel_hdr->contents = (PTR) bfd_zalloc (abfd, rel_hdr->sh_size);
if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0)
return false;
if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0)
return false;