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]
Other format: [Raw text]

ld segfault introduced with eh-frame-hdr patch


The ld testsuite has been failing since Jakub's last commit.

	* elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.

Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.131
diff -u -p -r1.131 elflink.h
--- elflink.h	2001/12/13 11:09:29	1.131
+++ elflink.h	2001/12/14 01:41:19
@@ -7950,8 +7950,10 @@ elf_bfd_discard_info (output_bfd, info)
       || ! is_elf_hash_table (info))
     return false;
 
-  ehdr = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
-				  ".eh_frame_hdr");
+  ehdr = NULL;
+  if (elf_hash_table (info)->dynobj != NULL)
+    ehdr = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
+				    ".eh_frame_hdr");
 
   for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
     {


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