Relocate symbols using an array of section_offsets, rather than a
authorJohn Gilmore <gnu@cygnus>
Sat, 4 Jul 1992 21:03:34 +0000 (21:03 +0000)
committerJohn Gilmore <gnu@cygnus>
Sat, 4 Jul 1992 21:03:34 +0000 (21:03 +0000)
commit2af231b836952be9b33fd441a25ee24d876c1494
tree22da3970d116c5a3d053b9f46cddadc7a40f53ac
parent37e2f5cb8d16a30e1916f1a9c039b3206c1e3da7
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.

* dbxread.c:  Conforming changes.
(struct dbx_symfile_info):  Move to gdb-stabs.h.
(start_psymtab):  Call elfstab_offset_sections to calculate good
offsets for this source file, based on the ELF symbol table info.
(read_ofile_symtab):  Yank N_CATCH, which is dead.
(process_one_symbol, N_CATCH):  Yank.
(", N_FUN, N_FNAME, N_FN, N_FN_SEQ, N_SO, N_SOL, N_ENTRY):
Relocate with SECT_OFF_TEXT.
(", N_STSYM, N_LCSYM, N_ROSYM):  Grope around in the stab string
to distinguish relocatable from absolute symbols.  Then, if not
absolute, do:
(", N_STSYM, N_DSLINE):  SECT_OFF_DATA.
(", N_LCSYM, N_BSLINE):  SECT_OFF_BSS.
(", N_ROSYM):  SECT_OFF_RODATA.
(elfstab_build_psymtabs):  Caller has allocated dbx_symfile_info.
(dbx_symfile_offsets):  Add to translate addr to offset.
gdb/dbxread.c