* som.h (som_symbol_type): Add "stringtab_offset" field.
authorJeff Law <law@redhat.com>
Wed, 14 Sep 1994 21:44:35 +0000 (21:44 +0000)
committerJeff Law <law@redhat.com>
Wed, 14 Sep 1994 21:44:35 +0000 (21:44 +0000)
* som.c (som_write_symbol_strings): Use "stringtab_offset"
rather than destroying the "name" field in the BFD symbol.
(som_build_and_write_symbol_table): Likewise.

bfd/ChangeLog
bfd/som.c
bfd/som.h

index ec5969dc475978587149fe31aaf9cecb55b86e44..5c3a7835394af74bf519c84d7f4a580044889389 100644 (file)
@@ -1,3 +1,10 @@
+Wed Sep 14 15:37:19 1994  Jeff Law  (law@snake.cs.utah.edu)
+
+       * som.h (som_symbol_type): Add "stringtab_offset" field.
+       * som.c (som_write_symbol_strings): Use "stringtab_offset"
+       rather than destroying the "name" field in the BFD symbol.
+       (som_build_and_write_symbol_table): Likewise.
+
 Wed Sep 14 15:06:55 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
 
        * libecoff.h (struct ecoff_tdata): Add field find_buffer.
index 0c63652772a4fa8d73d9b0cf26017a23384242dd..8531a5b91ab33c358b4d5e35ea91d8ee3762fe7f 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -2759,8 +2759,7 @@ som_write_symbol_strings (abfd, current_offset, syms, num_syms, string_sizep)
       /* Next comes the string itself + a null terminator.  */
       strcpy (p, syms[i]->name);
 
-      /* ACK.  FIXME.  */
-      syms[i]->name = (char *)strings_size;
+      som_symbol_data(syms[i])->stringtab_offset = strings_size;
       p += length + 1;
       strings_size += length + 1;
 
@@ -3548,7 +3547,7 @@ som_build_and_write_symbol_table (abfd)
       /* This is really an index into the symbol strings table.  
         By the time we get here, the index has already been 
         computed and stored into the name field in the BFD symbol.  */
-      som_symtab[i].name.n_strx = (int) bfd_syms[i]->name;
+      som_symtab[i].name.n_strx = som_symbol_data(bfd_syms[i])->stringtab_offset;
 
       /* Derive SOM information from the BFD symbol.  */
       som_bfd_derive_misc_symbol_info (abfd, bfd_syms[i], &info);
index 196cb9cd3bf265cf92266a48bcee55d34cfadda9..99b777d3ca8da676cf0ec7b0f44068b423a12a46 100644 (file)
--- a/bfd/som.h
+++ b/bfd/som.h
@@ -64,6 +64,10 @@ typedef struct som_symbol
        the symbols from most used to least used we can significantly
        reduce the size of the relocation stream for incomplete objects.  */
     int reloc_count;
+
+    /* During object file writing, the offset of the name of this symbol
+       in the SOM string table. */
+    int stringtab_offset;
   }
 som_symbol_type;