This is the mail archive of the bfd@sourceware.cygnus.com mailing list for the bfd project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A patch for elf.c


> 
> 
> 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)