aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-03-21 02:08:37 +0000
committerJeff Law <law@redhat.com>1994-03-21 02:08:37 +0000
commitc2e1207b3a4108081d020f437ba7aba69789e177 (patch)
tree9022603d1cba18afa25d2640dd05419037e576f6 /bfd/som.c
parent7f695c077c18350ae31b4799f7d72682f3c2f08c (diff)
downloadgdb-c2e1207b3a4108081d020f437ba7aba69789e177.zip
gdb-c2e1207b3a4108081d020f437ba7aba69789e177.tar.gz
gdb-c2e1207b3a4108081d020f437ba7aba69789e177.tar.bz2
* som.c (bfd_section_from_som_symbol): Only to do the value
comparison for function symbols within executables.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/bfd/som.c b/bfd/som.c
index 495db70..a75b26d 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -3263,7 +3263,7 @@ som_write_headers (abfd)
/* Skip any section which does not correspond to a space or
subspace, or which SEC_ALLOC set (and therefore handled
- in the loadable spaces/subspaces code above. */
+ in the loadable spaces/subspaces code above). */
if (!som_is_subspace (subsection)
|| !som_is_container (section, subsection)
@@ -3622,9 +3622,14 @@ bfd_section_from_som_symbol (abfd, symbol)
{
asection *section;
- /* The meaning of the symbol_info field changes for executables. So
- only use the quick symbol_info mapping for incomplete objects. */
- if ((abfd->flags & EXEC_P) == 0)
+ /* The meaning of the symbol_info field changes for functions
+ within executables. So only use the quick symbol_info mapping for
+ incomplete objects and non-function symbols in executables. */
+ if ((abfd->flags & EXEC_P) == 0
+ || (symbol->symbol_type != ST_ENTRY
+ && symbol->symbol_type != ST_PRI_PROG
+ && symbol->symbol_type != ST_SEC_PROG
+ && symbol->symbol_type != ST_MILLICODE))
{
unsigned int index = symbol->symbol_info;
for (section = abfd->sections; section != NULL; section = section->next)