* Clean up xcoff relocation.
objfiles.h (struct objfiles): Add section_offsets, num_sections. symfile.c (syms_from_objfile), xcoffread.c (xcoff_symfile_offsets): Set them. symtab.h (struct general_symbol_info): Add section field. minsyms.c (prim_record_minimal_symbol{,_and_info}): Set it. xcoffread.c: Set section for symbols and msymbols. (struct symtab): Add block_line_section field. buildsym.c (end_symtab): Set it. (end_symtab and callers): Add section parameter. objfiles.c (objfile_relocate): New funciton. xcoffexec.c (vmap_symtab): Use it. xcoffsolib.h (struct vmap): Remove unused fields. config/rs6000/tm-rs6000.h, stack.c, xcoffexec.c: Remove CORE_NEEDS_RELOCATION, symtab_relocated. config/rs6000/tm-rs6000.h: Remove use of loadinfotext. rs6000-tdep.c: Make loadinfotext static. breakpoint.c (fixup_breakpoints): Doc fix. symtab.h (struct symtab), config/rs6000/tm-rs6000.h, buildsym.c (end_symtab): primary field replaces nonreloc.
This commit is contained in:
parent
786f2f3402
commit
3c02636b4e
12 changed files with 279 additions and 204 deletions
|
@ -245,6 +245,18 @@ struct objfile
|
|||
gets freed automatically when reading a new object file. */
|
||||
|
||||
PTR obj_private;
|
||||
|
||||
/* Set of relocation offsets to apply to each section.
|
||||
Currently on the psymbol_obstack (which makes no sense, but I'm
|
||||
not sure it's harming anything).
|
||||
|
||||
These offsets indicate that all symbols (including partial and
|
||||
minimal symbols) which have been read have been relocated by this
|
||||
much. Symbols which are yet to be read need to be relocated by
|
||||
it. */
|
||||
|
||||
struct section_offsets *section_offsets;
|
||||
int num_sections;
|
||||
};
|
||||
|
||||
/* Defines for the objfile flag word. */
|
||||
|
@ -306,6 +318,9 @@ free_objfile PARAMS ((struct objfile *));
|
|||
extern void
|
||||
free_all_objfiles PARAMS ((void));
|
||||
|
||||
extern void
|
||||
objfile_relocate PARAMS ((struct objfile *, struct section_offsets *));
|
||||
|
||||
extern int
|
||||
have_partial_symbols PARAMS ((void));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue