diff options
author | John Gilmore <gnu@cygnus> | 1992-07-04 13:59:03 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-07-04 13:59:03 +0000 |
commit | 2670f34d21cbd859050111686f945b73f005a70d (patch) | |
tree | 3ca968e2a7f72326197808f1b991a4b29642bb32 /gdb/symtab.h | |
parent | 76512886f9d138f88e0c853a36681243aef32c64 (diff) | |
download | gdb-2670f34d21cbd859050111686f945b73f005a70d.zip gdb-2670f34d21cbd859050111686f945b73f005a70d.tar.gz gdb-2670f34d21cbd859050111686f945b73f005a70d.tar.bz2 |
Relocate symbols using an array of section_offsets, rather than a
single `addr' or `offset'. This makes Solaris-2 support work, and
permits better VxWorks (and maybe xcoff) support later. See ChangeLog.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 5909d5f..6b9c402 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -334,6 +334,23 @@ struct source struct linetable contents; }; +/* How to relocate the symbols from each section in a symbol file. + Each struct contains an array of offsets. + The ordering and meaning of the offsets is file-type-dependent; + typically it is indexed by section numbers or symbol types or + something like that. + + To give us flexibility in changing the internal representation + of these offsets, the ANOFFSET macro must be used to insert and + extract offset values in the struct. */ + +struct section_offsets + { + CORE_ADDR offsets[1]; /* As many as needed. */ + }; + +#define ANOFFSET(secoff, whichone) (secoff->offsets[whichone]) + /* Each source file is represented by a struct symtab. These objects are chained through the `next' field. */ @@ -404,10 +421,9 @@ struct partial_symtab /* Information about the object file from which symbols should be read. */ struct objfile *objfile; - /* Address relative to which the symbols in this file are. Need to - relocate by this amount when reading in symbols from the symbol - file. */ - CORE_ADDR addr; + /* Set of relocation offsets to apply to each section. */ + struct section_offsets *section_offsets; + /* Range of text addresses covered by this file; texthigh is the beginning of the next section. */ CORE_ADDR textlow, texthigh; |