From eb57c776702450b08f37a187f96f59ff13f67009 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 5 Jan 1995 00:34:07 +0000 Subject: [PATCH] * som.c (bfd_section_from_som_symbol): Only return sections which correspond to subspaces. --- bfd/ChangeLog | 3 +++ bfd/som.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b59f4e7670a..99d067db5ed 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Wed Jan 4 14:14:05 1995 Jeff Law (law@snake.cs.utah.edu) + * som.c (bfd_section_from_som_symbol): Only return sections which + correspond to subspaces. + * som.c (som_begin_writing): Don't forget to bump the total_subspaces when writing the unloadable subspaces. diff --git a/bfd/som.c b/bfd/som.c index d0c9fc60d86..bec94b86e40 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -3685,7 +3685,7 @@ bfd_section_from_som_symbol (abfd, symbol) { unsigned int index = symbol->symbol_info; for (section = abfd->sections; section != NULL; section = section->next) - if (section->target_index == index) + if (section->target_index == index && som_is_subspace (section)) return section; /* Could be a symbol from an external library (such as an OMOS @@ -3702,7 +3702,8 @@ bfd_section_from_som_symbol (abfd, symbol) for (section = abfd->sections; section; section = section->next) { if (value >= section->vma - && value <= section->vma + section->_cooked_size) + && value <= section->vma + section->_cooked_size + && som_is_subspace (section)) return section; } -- 2.30.2