aboutsummaryrefslogtreecommitdiff
path: root/gdb/somread.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-07-21 04:26:39 +0000
committerJeff Law <law@redhat.com>1995-07-21 04:26:39 +0000
commit5dc74605b07a9fdc015562f3d0c76072fc98d473 (patch)
tree7cde3f9b34f8806910db267de4d12ebf0436f72c /gdb/somread.c
parent883e2f510d527d986efb2cb27318a6d23932a829 (diff)
downloadgdb-5dc74605b07a9fdc015562f3d0c76072fc98d473.zip
gdb-5dc74605b07a9fdc015562f3d0c76072fc98d473.tar.gz
gdb-5dc74605b07a9fdc015562f3d0c76072fc98d473.tar.bz2
* 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. mentor-7462
Diffstat (limited to 'gdb/somread.c')
-rw-r--r--gdb/somread.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/somread.c b/gdb/somread.c
index bee059d..c2ebf14 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -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;
}