aboutsummaryrefslogtreecommitdiff
path: root/gdb/somsolib.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-06-12 06:24:20 +0000
committerJeff Law <law@redhat.com>1995-06-12 06:24:20 +0000
commit99e0981c6085e677fd1001a7bc605d1daff2cdc4 (patch)
treeedb9c886e62cb3496fae9a3364b0f55e4053527d /gdb/somsolib.c
parent74b3ead343a514772c3a00bbf1a9f4fd078d4e31 (diff)
downloadgdb-99e0981c6085e677fd1001a7bc605d1daff2cdc4.zip
gdb-99e0981c6085e677fd1001a7bc605d1daff2cdc4.tar.gz
gdb-99e0981c6085e677fd1001a7bc605d1daff2cdc4.tar.bz2
* somsolib.c: Include gdb-stabs.h.
(som_solib_section_offsets): Use SECT_OFF_XXX rather than 0, 1, etc. Initialize offsets for RODATA & BSS too. Remainder of mentor-6302.
Diffstat (limited to 'gdb/somsolib.c')
-rw-r--r--gdb/somsolib.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 91b0e0c..199f67c 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -33,6 +33,7 @@ and by Cygnus Support. */
#include "symfile.h"
#include "objfiles.h"
#include "inferior.h"
+#include "gdb-stabs.h"
/* TODO:
@@ -584,8 +585,11 @@ som_solib_section_offsets (objfile, offsets)
asection *private_section;
/* The text offset is easy. */
- ANOFFSET (offsets, 0) = (so_list->som_solib.text_addr
- - so_list->som_solib.text_link_addr);
+ ANOFFSET (offsets, SECT_OFF_TEXT)
+ = (so_list->som_solib.text_addr
+ - so_list->som_solib.text_link_addr);
+ ANOFFSET (offsets, SECT_OFF_RODATA)
+ = ANOFFSET (offsets, SECT_OFF_TEXT);
/* We should look at presumed_dp in the SOM header, but
that's not easily available. This should be OK though. */
@@ -594,11 +598,14 @@ som_solib_section_offsets (objfile, offsets)
if (!private_section)
{
warning ("Unable to find $PRIVATE$ in shared library!");
- ANOFFSET (offsets, 1) = 0;
+ ANOFFSET (offsets, SECT_OFF_DATA) = 0;
+ ANOFFSET (offsets, SECT_OFF_BSS) = 0;
return 1;
}
- ANOFFSET (offsets, 1) = (so_list->som_solib.data_start
- - private_section->vma);
+ ANOFFSET (offsets, SECT_OFF_DATA)
+ = (so_list->som_solib.data_start - private_section->vma);
+ ANOFFSET (offsets, SECT_OFF_BSS)
+ = ANOFFSET (offsets, SECT_OFF_DATA);
return 1;
}
so_list = so_list->next;