* somread.c (som_symtab_read): Add unsatisfied common symbols to
authorJeff Law <law@redhat.com>
Fri, 21 Jul 1995 04:26:39 +0000 (04:26 +0000)
committerJeff Law <law@redhat.com>
Fri, 21 Jul 1995 04:26:39 +0000 (04:26 +0000)
the minimal symbol table.  All common symbols are "unsatisfied"
when -E is passed to the linker.

mentor-7462

gdb/ChangeLog
gdb/somread.c

index 59dda573849db0b6bdebfb791acda453c7ed9dd5..3f5caf32a43deec126eb00bd70fc856ccb552043 100644 (file)
@@ -1,3 +1,9 @@
+Thu Jul 20 22:22:34 1995  Jeff Law  (law@snake.cs.utah.edu)
+
+       * somread.c (som_symtab_read): Add unsatisfied common symbols to
+       the minimal symbol table.  All common symbols are "unsatisfied"
+       when -E is passed to the linker.
+
 Thu Jul 20 15:04:57 1995  Fred Fish  <fnf@cygnus.com>
 
        * top.c (show_endian): Cast first arg of printf_unfiltered to
index bee059d281ac74bdf830155f614c93b620d1c882..c2ebf14312573a5c10a19733ab07e00bfe6fc2ae 100644 (file)
@@ -286,6 +286,23 @@ som_symtab_read (abfd, objfile, section_offsets)
            }
          break;
 
+       /* This can happen for common symbols when -E is passed to the
+          final link.  No idea _why_ that would make the linker force
+          common symbols to have an SS_UNSAT scope, but it does.  */
+       case SS_UNSAT:
+         switch (bufp->symbol_type)
+           {
+             case ST_STORAGE:
+               symname = bufp->name.n_strx + stringtab;
+               bufp->symbol_value += data_offset;
+               ms_type = mst_data;
+               break;
+
+             default:
+               continue;
+           }
+         break;
+
        default:
          continue;
        }