diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-19 14:08:46 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-19 14:08:46 +0000 |
commit | 0046d64d90c3fac53d44073a15163d25fb07a87a (patch) | |
tree | 754c894c3c00ccd0fc78fe34bd01d02f59c80f0d /bfd/xcofflink.c | |
parent | 030feb2d51d5bd26ffb7d25ccd977d9f9ea375bf (diff) | |
download | gdb-0046d64d90c3fac53d44073a15163d25fb07a87a.tar.gz |
* xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
the entry symbol is not set.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r-- | bfd/xcofflink.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index c882d237328..d25c0c6eccb 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 <ian@cygnus.com>, 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 |