* som.c (som_slurp_symbol_table): Set the symbol count to the
authorIan Lance Taylor <ian@airs.com>
Fri, 26 Apr 1996 22:01:22 +0000 (22:01 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 26 Apr 1996 22:01:22 +0000 (22:01 +0000)
number of BFD symbols created.
PR 5332.

bfd/ChangeLog
bfd/som.c

index 5f1633a198a2cd63cad6f80565e492b0e0fc270c..f1c67f6f2d047e7795e875bdbf7f5a1ef158e390 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 26 18:00:37 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * som.c (som_slurp_symbol_table): Set the symbol count to the
+       number of BFD symbols created.
+
 Fri Apr 26 12:34:29 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
 
        * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
index 47ffbb1d9f7582477f53669460f210162a6d9a8a..a1cf4cd52ed2c8ed991f926afcccf721103320c7 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1529,6 +1529,34 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field, sym_diff)
        final_types[2] = NULL;
        *final_type = base_type;
        break;
+
+      case e_nsel:
+       final_types[0] = (int *) bfd_alloc_by_size_t (abfd, sizeof (int));
+       if (!final_types[0])
+         return NULL;
+       *final_types[0] = R_N1SEL;
+       final_types[1] = final_type;
+       final_types[2] = NULL;
+       *final_type = base_type;
+       break;
+
+      case e_nlsel:
+      case e_nlrsel:
+       final_types[0] = (int *) bfd_alloc_by_size_t (abfd, sizeof (int));
+       if (!final_types[0])
+         return NULL;
+       *final_types[0] = R_N0SEL;
+       final_types[1] = (int *) bfd_alloc_by_size_t (abfd, sizeof (int));
+       if (!final_types[1])
+         return NULL;
+       if (field == e_nlsel)
+         *final_types[1] = R_N_MODE;
+       else
+         *final_types[1] = R_R_MODE;
+       final_types[2] = final_type;
+       final_types[3] = NULL;
+       *final_type = base_type;
+       break;
     }
   
   switch (base_type)
@@ -2752,6 +2780,8 @@ som_write_fixups (abfd, current_offset, total_reloc_sizep)
                case R_RSEL:
                case R_BEGIN_BRTAB:
                case R_END_BRTAB:
+               case R_N0SEL:
+               case R_N1SEL:
                  bfd_put_8 (abfd, bfd_reloc->howto->type, p);
                  subspace_reloc_size += 1;
                  p += 1;
@@ -4074,8 +4104,12 @@ som_slurp_symbol_table (abfd)
       sym++;
     }
 
- /* Save our results and return success.  */
- obj_som_symtab (abfd) = symbase;
+  /* We modify the symbol count to record the number of BFD symbols we
+     created.  */
+  bfd_get_symcount (abfd) = sym - symbase;
+
+  /* Save our results and return success.  */
+  obj_som_symtab (abfd) = symbase;
  successful_return:
   if (buf != NULL)
     free (buf);