* pe-dll.c (fill_edata): Check that exported_symbol_sections is
authorDanny Smith <dannysmith@users.sourceforge.net>
Wed, 25 Feb 2004 21:00:32 +0000 (21:00 +0000)
committerDanny Smith <dannysmith@users.sourceforge.net>
Wed, 25 Feb 2004 21:00:32 +0000 (21:00 +0000)
not NULL.

ld/ChangeLog
ld/pe-dll.c

index 527c36aaa391067db0121f621b6107bb2384e4ae..f7772544b1e5c63525919773336c27962dce1344 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-25  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * pe-dll.c (fill_edata): Check that exported_symbol_sections is
+       not NULL.
+
 2004-02-23  Ian Lance Taylor  <ian@wasabisystems.com>
 
        * ldlang.c (lang_check): Use %P, not %E, in error message.
index ce3f443d550c16bc298383b93d212a1442034e49..5c4a3ad72b37b29ed63eb4e6f0e97518606abc1c 100644 (file)
@@ -966,9 +966,9 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
   hint = 0;
   for (s = 0; s < NE; s++)
     {
-      if (pe_def_file->exports[s].ordinal != -1)
+      struct bfd_section *ssec = exported_symbol_sections[s];
+      if (ssec && pe_def_file->exports[s].ordinal != -1)
        {
-         struct bfd_section *ssec = exported_symbol_sections[s];
          unsigned long srva = (exported_symbol_offsets[s]
                                + ssec->output_section->vma
                                + ssec->output_offset);