diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1996-11-02 11:59:19 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1996-11-02 11:59:19 +0000 |
commit | 73b8e6a91526a2c6b6ef77730844aabaaa0886fe (patch) | |
tree | d7c6a4be7189f459e26eb934224b2c214c1af105 /gdb/irix5-nat.c | |
parent | 61e5b759cda25bec432271b643f32880faa430f4 (diff) | |
download | gdb-73b8e6a91526a2c6b6ef77730844aabaaa0886fe.zip gdb-73b8e6a91526a2c6b6ef77730844aabaaa0886fe.tar.gz gdb-73b8e6a91526a2c6b6ef77730844aabaaa0886fe.tar.bz2 |
* irix5-nat.c, osfsolib.c, solib.c (symbol_add_stub): Handle
missing or zero-sized .text sections properly.
* mdebugread.c: Handle scRConst and scSUndefined storage classes.
* stabsread.c (scan_file_globals): Try to resolve symbols
for shared libraries from the minimal symbol table of the main
executable first.
Diffstat (limited to 'gdb/irix5-nat.c')
-rw-r--r-- | gdb/irix5-nat.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c index 8490968..7bba96d 100644 --- a/gdb/irix5-nat.c +++ b/gdb/irix5-nat.c @@ -566,9 +566,28 @@ symbol_add_stub (arg) char *arg; { register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */ + CORE_ADDR text_addr = 0; + + if (so -> textsection) + text_addr = so -> textsection -> addr; + else + { + asection *lowest_sect; + + /* If we didn't find a mapped non zero sized .text section, set up + text_addr so that the relocation in symbol_file_add does no harm. */ + + lowest_sect = bfd_get_section_by_name (so -> abfd, ".text"); + if (lowest_sect == NULL) + bfd_map_over_sections (so -> abfd, find_lowest_section, + (PTR) &lowest_sect); + if (lowest_sect) + text_addr = bfd_section_vma (so -> abfd, lowest_sect) + + (CORE_ADDR) LM_ADDR (so) - so -> lm.o_base_address; + } so -> objfile = symbol_file_add (so -> lm.o_path, so -> from_tty, - (unsigned int) so -> textsection -> addr, + text_addr, 0, 0, 0); return (1); } |