From: Ian Lance Taylor Date: Sat, 19 Jun 1999 14:08:46 +0000 (+0000) Subject: * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1c1b62d2b4eb1553d3c5df9b3ba25e2d6eb3b318;p=pf3gnuchains%2Fpf3gnuchains3x.git * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if the entry symbol is not set. --- diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index c882d23732..d25c0c6ecc 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -1,5 +1,5 @@ /* POWER/PowerPC XCOFF linker support. - Copyright 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. Written by Ian Lance Taylor , Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -3272,10 +3272,15 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry, xcoff_hash_table (info)->file_align = file_align; xcoff_hash_table (info)->textro = textro; - hentry = xcoff_link_hash_lookup (xcoff_hash_table (info), entry, - false, false, true); - if (hentry != NULL) - hentry->flags |= XCOFF_ENTRY; + if (entry == NULL) + hentry = NULL; + else + { + hentry = xcoff_link_hash_lookup (xcoff_hash_table (info), entry, + false, false, true); + if (hentry != NULL) + hentry->flags |= XCOFF_ENTRY; + } /* Garbage collect unused sections. */ if (info->relocateable