aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-08-31 03:30:39 +0000
committerJeff Law <law@redhat.com>1994-08-31 03:30:39 +0000
commitb905bde1a97f5ac722f42dc4a7e03da79070aa8b (patch)
tree34e3a24bd339bf459d0e9098d8c7dd45d6351e30 /bfd/som.c
parenta48f997a6bdb8a634169cb7093f9a25e79243895 (diff)
downloadgdb-b905bde1a97f5ac722f42dc4a7e03da79070aa8b.zip
gdb-b905bde1a97f5ac722f42dc4a7e03da79070aa8b.tar.gz
gdb-b905bde1a97f5ac722f42dc4a7e03da79070aa8b.tar.bz2
* som.c (som_write_fixups, case R_ENTRY): Handle case where no
unwind descriptor information is available.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/bfd/som.c b/bfd/som.c
index e9930aa..736500b 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -2521,11 +2521,25 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
case R_ENTRY:
{
- int *descp
- = (int *) som_symbol_data (*bfd_reloc->sym_ptr_ptr)->unwind;
+ int *descp = (int *)
+ som_symbol_data (*bfd_reloc->sym_ptr_ptr)->unwind;
bfd_put_8 (abfd, R_ENTRY, p);
- bfd_put_32 (abfd, descp[0], p + 1);
- bfd_put_32 (abfd, descp[1], p + 5);
+
+ /* FIXME: We should set the sym_ptr for the R_ENTRY
+ reloc to point to the appropriate function symbol,
+ and attach unwind bits to the function symbol as
+ we canonicalize the relocs. Doing so would ensure
+ descp would always point to something useful. */
+ if (descp)
+ {
+ bfd_put_32 (abfd, descp[0], p + 1);
+ bfd_put_32 (abfd, descp[1], p + 5);
+ }
+ else
+ {
+ bfd_put_32 (abfd, 0, p + 1);
+ bfd_put_32 (abfd, 0, p + 5);
+ }
p = try_prev_fixup (abfd, &subspace_reloc_size,
p, 9, reloc_queue);
break;
@@ -5539,6 +5553,7 @@ som_bfd_free_cached_info (abfd)
#define som_generic_stat_arch_elt bfd_generic_stat_arch_elt
#define som_truncate_arname bfd_bsd_truncate_arname
#define som_slurp_extended_name_table _bfd_slurp_extended_name_table
+#define som_update_armap_timestamp bfd_true
#define som_get_lineno _bfd_nosymbols_get_lineno
#define som_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol