* elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
[deliverable/binutils-gdb.git] / bfd / vms-gsd.c
index 002412232dc2b1c64f37ef73875c478ccb4d2ae3..7bb7a7735996bec5ebe12d3be63e5840635927ca 100644 (file)
@@ -420,7 +420,7 @@ _bfd_vms_slurp_gsd (abfd, objtype)
                        {
                          bfd_set_error (bfd_error_no_memory);
                          return -1;
-                       }
+                       }
                    }
                }
              else
@@ -661,20 +661,22 @@ _bfd_vms_slurp_gsd (abfd, objtype)
              }
            else        /* symbol reference */
              {
-               symbol->name =
+               symbol->name =
                  _bfd_vms_save_counted_string (vms_rec+8);
 #if VMS_DEBUG
                vms_debug(4, "egsd sym ref #%d (%s, %04x=%s)\n", abfd->symcount,
                           symbol->name, old_flags, flag2str(gsyflagdesc, old_flags));
 #endif
-               symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME);
+               symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME);
              }
 
            symbol->flags = new_flags;
 
            /* save symbol in vms_symbol_table  */
 
-           entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV(vms_symbol_table), symbol->name, true, false);
+           entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV(vms_symbol_table),
+                                                         symbol->name,
+                                                         TRUE, FALSE);
            if (entry == (vms_symbol_entry *)NULL)
              {
                bfd_set_error (bfd_error_no_memory);
@@ -901,7 +903,7 @@ _bfd_vms_write_gsd (abfd, objtype)
          unsigned long ca_psindx = 0;
          unsigned long psindx;
 
-         if (old_flags & BSF_FUNCTION)
+         if ((old_flags & BSF_FUNCTION) && symbol->udata.p != NULL)
            {
              code_address = ((asymbol *) (symbol->udata.p))->value;
              ca_psindx = ((asymbol *) (symbol->udata.p))->section->index;
This page took 0.024323 seconds and 4 git commands to generate.