aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-09-14 21:44:35 +0000
committerJeff Law <law@redhat.com>1994-09-14 21:44:35 +0000
commit8a2cdc6278bd8478f2cfac2d90683dbda1789898 (patch)
tree443bc4fb5bf46fd7e15ce9786a622176f8fc7cf2 /bfd/som.c
parent467a038026851fffa1f554f09ae1a634d393f788 (diff)
downloadgdb-8a2cdc6278bd8478f2cfac2d90683dbda1789898.zip
gdb-8a2cdc6278bd8478f2cfac2d90683dbda1789898.tar.gz
gdb-8a2cdc6278bd8478f2cfac2d90683dbda1789898.tar.bz2
* 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.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bfd/som.c b/bfd/som.c
index 0c63652..8531a5b 100644
--- 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);