* Makefile.in (xcoffread.o): Depend on partial-stab.h.

* xcoffsolib.c (sharedlibrary_command): New command.
	* xcoffsolib.c (solib_info): Call xcoff_relocate_symtab.
	* xcoffsolib.c: Miscellaneous cleanups.

	* partial-stab.h: Ignore symbol descriptor '-' (for local
	variables with negative type numbers) without complaint.

	* rs6000-nat.c (vmap_ldinfo): Use bfd_stat rather than our own
	local emulation thereof.  Remove unused variable ostart.
This commit is contained in:
Jim Kingdon
1995-05-18 05:24:29 +00:00
parent 8558c4e316
commit fb49432789
4 changed files with 66 additions and 45 deletions

View File

@@ -435,7 +435,6 @@ vmap_ldinfo (ldi)
struct stat ii, vi;
register struct vmap *vp;
int got_one, retried;
CORE_ADDR ostart;
int got_exec_file;
/* For each *ldi, see if we have a corresponding *vp.
@@ -453,8 +452,6 @@ vmap_ldinfo (ldi)
retry:
for (got_one = 0, vp = vmap; vp; vp = vp->nxt)
{
FILE *io;
/* First try to find a `vp', which is the same as in ldinfo.
If not the same, just continue and grep the next `vp'. If same,
relocate its tstart, tend, dstart, dend values. If no such `vp'
@@ -467,14 +464,14 @@ vmap_ldinfo (ldi)
|| (memb[0] && !STREQ(memb, vp->member)))
continue;
io = bfd_cache_lookup (vp->bfd); /* totally opaque! */
if (!io)
fatal ("cannot find BFD's iostream for %s", vp->name);
/* See if we are referring to the same file. */
/* An error here is innocuous, most likely meaning that
the file descriptor has become worthless. */
if (fstat (fileno(io), &vi) < 0)
if (bfd_stat (vp->bfd, &vi) < 0)
/* An error here is innocuous, most likely meaning that
the file descriptor has become worthless.
FIXME: What does it mean for a file descriptor to become
"worthless"? What makes it happen? What error does it
produce (ENOENT? others?)? Should we at least provide
a warning? */
continue;
if (ii.st_dev != vi.st_dev || ii.st_ino != vi.st_ino)
@@ -485,8 +482,7 @@ vmap_ldinfo (ldi)
++got_one;
/* found a corresponding VMAP. remap! */
ostart = vp->tstart;
/* Found a corresponding VMAP. Remap! */
/* We can assume pointer == CORE_ADDR, this code is native only. */
vp->tstart = (CORE_ADDR) ldi->ldinfo_textorg;
@@ -507,7 +503,7 @@ vmap_ldinfo (ldi)
/* relocate symbol table(s). */
vmap_symtab (vp);
/* there may be more, so we don't break out of the loop. */
/* There may be more, so we don't break out of the loop. */
}
/* if there was no matching *vp, we must perforce create the sucker(s) */