diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-06-12 11:10:13 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-06-12 11:10:13 +0000 |
commit | 33c66e44edbe585eb5a1699a4682aad28e68325f (patch) | |
tree | f4a88ec2be78c873bde38425f5715cbe1c9b0d98 /gdb/irix5-nat.c | |
parent | b132667509774490391e79eed8ba3253574c602d (diff) | |
download | gdb-33c66e44edbe585eb5a1699a4682aad28e68325f.zip gdb-33c66e44edbe585eb5a1699a4682aad28e68325f.tar.gz gdb-33c66e44edbe585eb5a1699a4682aad28e68325f.tar.bz2 |
* config/m68k/dpx2.mh (NATDEPFILES): Remove duplicate inclusion
of inftarg.o.
* config/m68k/tm-dpx2.h (CANNOT_STORE_REGISTER): Define to inhibit
writing of floating registers, the dpx2 kernel disallows it.
* irix5-nat.c (LM_ADDR): The loaded address of the shared library
is contained in o_praw.
* irix5-nat.c (solib_map_sections): Adjust sections by the
difference between the loaded address and the prelinked address.
* irix5-nat.c (solib_address): Use LM_ADDR for the loaded start
address.
* mdebugread.c (parse_symbol): Do not relocate stEnd/scText
symbols, their value is absolute.
* mdebugread.c (parse_partial_symbols): Handle Irix 5.2 shared
libraries fh->adr fields of zero. Relocate minimal symbol values
upon readin. Relocate non-stabs symbols upon readin.
* mdebugread.c (psymtab_to_symtab_1): Use pst->textlow for the
start address of the outermost block.
* mdebugread.c (parse_lines, parse_procedure): Pass in pst
instead of section_offsets and use relocated pst->textlow for
line number and procedure address relocations.
From gmo@MicroUnity.com (Guillermo A. Loyola):
* mdebugread.c (parse_symbol, parse_partial_symbols, cross_ref):
Handle SGI Irix5 stIndirect symbol type.
Diffstat (limited to 'gdb/irix5-nat.c')
-rw-r--r-- | gdb/irix5-nat.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index ad0321d..590427e 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -1,5 +1,6 @@ /* Native support for the SGI Iris running IRIX version 5, for GDB. - Copyright 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994 + Free Software Foundation, Inc. Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. Implemented for Irix 4.x by Garrett A. Wollman. @@ -212,7 +213,7 @@ static char *bkpt_names[] = { #define DEBUG_BASE "__rld_obj_head" /* How to get the loaded address of a shared library. */ -#define LM_ADDR(so) ((so)->lm.o_base_address) +#define LM_ADDR(so) ((so)->lm.o_praw) char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */ @@ -303,6 +304,7 @@ solib_map_sections (so) struct section_table *p; struct cleanup *old_chain; bfd *abfd; + CORE_ADDR offset; filename = tilde_expand (so -> lm.o_path); old_chain = make_cleanup (free, filename); @@ -342,13 +344,20 @@ solib_map_sections (so) bfd_get_filename (exec_bfd), bfd_errmsg (bfd_get_error ())); } + /* Irix 5 shared objects are pre-linked to particular addresses + although the dynamic linker may have to relocate them if the + address ranges of the libraries used by the main program clash. + The offset is the difference between the address where the object + is mapped and the binding address of the shared library. */ + offset = (CORE_ADDR) LM_ADDR (so) - so -> lm.o_base_address; + for (p = so -> sections; p < so -> sections_end; p++) { /* Relocate the section binding addresses as recorded in the shared - object's file by the base address to which the object was actually - mapped. */ - p -> addr += (CORE_ADDR) LM_ADDR (so); - p -> endaddr += (CORE_ADDR) LM_ADDR (so); + object's file by the offset to get the address to which the + object was actually mapped. */ + p -> addr += offset; + p -> endaddr += offset; so -> lmend = (CORE_ADDR) max (p -> endaddr, so -> lmend); if (STREQ (p -> the_bfd_section -> name, ".text")) { @@ -773,7 +782,7 @@ solib_address (address) { if (so -> lm.o_path[0]) { - if ((address >= (CORE_ADDR) so->lm.o_base_address) && + if ((address >= (CORE_ADDR) LM_ADDR (so)) && (address < (CORE_ADDR) so -> lmend)) { return (1); |