This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Fix seg fault introduced by ia64 unwind code.


Hi Guys,

  When testing the new IA64 unwind code, I missed that it will seg
fault if the target use REL relocations.  I am applying the patch
below to fix this, and also to remove a compile time warning.

Cheers
	Nick

2001-02-11  Nick Clifton  <nickc@redhat.com>

	* readelf.c (dump_relocations): Free corrected allocated
	array.
	(process_unwind): Fix compile time warning.

Index: readelf.c
===================================================================
RCS file: /cvs/src//src/binutils/readelf.c,v
retrieving revision 1.89
diff -p -r1.89 readelf.c
*** readelf.c	2001/02/10 22:20:55	1.89
--- readelf.c	2001/02/11 22:11:04
*************** dump_relocations (file, rel_offset, rel_
*** 997,1003 ****
        putchar ('\n');
      }
  
!   free (relas);
  
    return 1;
  }
--- 997,1006 ----
        putchar ('\n');
      }
  
!   if (is_rela)
!     free (relas);
!   else
!     free (rels);
  
    return 1;
  }
*************** process_unwind (file)
*** 3412,3418 ****
  	printf ("'%s'", SECTION_NAME (unwsec));
  
        printf (_(" at offset 0x%lx contains %lu entries:\n"),
! 	      unwsec->sh_offset, unwsec->sh_size / (3 * addr_size));
  
        (void) slurp_ia64_unwind_table (file, & aux, unwsec);
  
--- 3415,3421 ----
  	printf ("'%s'", SECTION_NAME (unwsec));
  
        printf (_(" at offset 0x%lx contains %lu entries:\n"),
! 	      unwsec->sh_offset, (unsigned long) (unwsec->sh_size / (3 * addr_size)));
  
        (void) slurp_ia64_unwind_table (file, & aux, unwsec);
  


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