aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-08-07 20:53:29 +0000
committerJeff Law <law@redhat.com>1995-08-07 20:53:29 +0000
commit515b81046b52abf8f09a3b0549f271b51b526c11 (patch)
tree4ec740e5ab8d2755e22983cf3bf516cc964a208d /bfd/som.c
parent3d915dd29d4cc5710d5dd740e3b8f270e846fbe6 (diff)
downloadgdb-515b81046b52abf8f09a3b0549f271b51b526c11.zip
gdb-515b81046b52abf8f09a3b0549f271b51b526c11.tar.gz
gdb-515b81046b52abf8f09a3b0549f271b51b526c11.tar.bz2
* som.c (som_decode_symclass): Handle absolute symbols by checking
the SOM type (since they will rarely if ever be in the absolute section). Something Ian noticed.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/bfd/som.c b/bfd/som.c
index 4bcd388..03b487e 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1523,7 +1523,12 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff)
bfd_set_error (bfd_error_no_memory);
return NULL;
}
- *final_types[0] = R_FSEL;
+ if (field == e_fsel)
+ *final_types[0] = R_FSEL;
+ else if (field == e_rsel)
+ *final_types[0] = R_RSEL;
+ else if (field == e_lsel)
+ *final_types[0] = R_LSEL;
*final_types[1] = R_COMP2;
*final_types[2] = R_COMP2;
*final_types[3] = R_COMP1;
@@ -1576,7 +1581,12 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff)
bfd_set_error (bfd_error_no_memory);
return NULL;
}
- *final_types[1] = R_FSEL;
+ if (field == e_fsel)
+ *final_types[0] = R_FSEL;
+ else if (field == e_rsel)
+ *final_types[0] = R_RSEL;
+ else if (field == e_lsel)
+ *final_types[0] = R_LSEL;
*final_types[1] = R_COMP2;
*final_types[2] = R_COMP2;
*final_types[3] = R_COMP1;
@@ -4605,8 +4615,8 @@ som_get_reloc_upper_bound (abfd, asect)
if (asect->flags & SEC_RELOC)
{
if (! som_slurp_reloc_table (abfd, asect, NULL, true))
- return false;
- return (asect->reloc_count + 1) * sizeof (arelent);
+ return -1;
+ return (asect->reloc_count + 1) * sizeof (arelent *);
}
/* There are no relocations. */
return 0;
@@ -4998,7 +5008,9 @@ som_decode_symclass (symbol)
if (!(symbol->flags & (BSF_GLOBAL|BSF_LOCAL)))
return '?';
- if (bfd_is_abs_section (symbol->section))
+ if (bfd_is_abs_section (symbol->section)
+ || (som_symbol_data (symbol) != NULL
+ && som_symbol_data (symbol)->som_type == SYMBOL_TYPE_ABSOLUTE))
c = 'a';
else if (symbol->section)
c = som_section_type (symbol->section->name);