From b905bde1a97f5ac722f42dc4a7e03da79070aa8b Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 31 Aug 1994 03:30:39 +0000 Subject: [PATCH] * som.c (som_write_fixups, case R_ENTRY): Handle case where no unwind descriptor information is available. --- bfd/ChangeLog | 5 +++++ bfd/som.c | 23 +++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e2a1c5c5c16..ff734aed16b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 30 21:24:54 1994 Jeff Law (law@snake.cs.utah.edu) + + * som.c (som_write_fixups, case R_ENTRY): Handle case where no + unwind descriptor information is available. + Tue Aug 30 11:43:30 1994 Eric Youngdale (ericy@cais.cais.com) * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname diff --git a/bfd/som.c b/bfd/som.c index e9930aa5854..736500b3c11 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 -- 2.30.2