From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: chris@beezer.med.miami.edu (Christopher C Chimelis) Cc: bfd@cygnus.com, ian@cygnus.com (Ian Lance Taylor) Subject: A patch for elf.c Date: Tue, 08 Dec 1998 09:57:00 -0000 Message-id: References: X-SW-Source: 1998/msg00072.html > > > On Mon, 7 Dec 1998, H.J. Lu wrote: > > > Could you please tell me on which platform you had this problem? > > Alpha running Debian Linux. Thanks for this information. BTW, have you mentioned this in your first bug report? I think this patch fixes the bug. Ian, this bug happens on ELF/Alpha when you strip more than one shared libraries at a time. It is not the first bfd_zalloc/bfd_alloc bug in bfd. It is quite annoying. -- H.J. Lu (hjl@gnu.org) ---- Tue Dec 8 07:51:09 1998 H.J. Lu (hjl@gnu.org) * elf.c (copy_private_bfd_data): Use bfd_zalloc instead of bfd_alloc. Index: elf.c =================================================================== RCS file: /home/work/cvs/gnu/binutils/bfd/elf.c,v retrieving revision 1.40 diff -u -p -r1.40 elf.c --- elf.c 1998/12/05 03:38:53 1.40 +++ elf.c 1998/12/08 17:48:01 @@ -3317,7 +3317,7 @@ copy_private_bfd_data (ibfd, obfd) /* Allocate a segment map big enough to contain all of the sections we have selected. */ m = ((struct elf_segment_map *) - bfd_alloc (obfd, + bfd_zalloc (obfd, (sizeof (struct elf_segment_map) + ((size_t) csecs - 1) * sizeof (asection *)))); if (m == NULL)