This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
ld segfault introduced with eh-frame-hdr patch
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Fri, 14 Dec 2001 12:19:50 +1030
- Subject: 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)
{