ld segfault introduced with eh-frame-hdr patch
Alan Modra
amodra@bigpond.net.au
Thu Dec 13 17:49:00 GMT 2001
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)
{
More information about the Binutils
mailing list