From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org, pedro_alves@portugalmail.pt (Pedro Alves)
Subject: Re: For example only, updated Windows DLL support and gdbserver DLL support
Date: Tue, 19 Jun 2007 19:06:00 -0000 [thread overview]
Message-ID: <200706191905.l5JJ5pcj014266@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20070618150816.GA24037@caradoc.them.org> from "Daniel Jacobowitz" at Jun 18, 2007 11:08:16 AM
Daniel Jacobowitz wrote:
> Ulrich, what do you think - would this work for AIX solib support?
The general idea looks good to me; in particular I think the segment
relocation approach should be suitable for AIX.
One thing I don't quite like is this:
> + case TARGET_OBJECT_LIBRARIES:
> + if (core_vec->xfer_shared_libraries != NULL)
> + return core_vec->xfer_shared_libraries (ops, object, annex, readbuf,
> + writebuf, offset, len);
I had understood the core_fns method of providing a core file target to
be deprecated, and in fact I just recently got rid of it for AIX in favour
of the gdbarch_regset_from_core_section callback ... I'd prefer this to
be a gdbarch callback (which would also support core file cross-debugging).
The build dependency on libexpat may be a bit annoying on AIX, but I guess
we'll just have to live with that anyway.
The one big unresolved problem (but that was also still unresolved with my
other approach) is the way AIX handles library archives. It is possible
to use an archive (.a) member as shared library; the operating system
loader will report a pair of file name and member name to identify
the "shared object".
The current rs6000-nat.c code uses this to open such an object:
/* make sure we have an object file */
if (bfd_check_format (abfd, bfd_object))
vp = map_vmap (abfd, 0);
else if (bfd_check_format (abfd, bfd_archive))
{
last = 0;
/* FIXME??? am I tossing BFDs? bfd? */
while ((last = bfd_openr_next_archived_file (abfd, last)))
if (DEPRECATED_STREQ (mem, last->filename))
break;
if (!last)
{
warning (_("\"%s\": member \"%s\" missing."), objname, mem);
bfd_close (abfd);
return NULL;
}
if (!bfd_check_format (last, bfd_object))
{
warning (_("\"%s\": member \"%s\" not in executable format: %s."),
objname, mem, bfd_errmsg (bfd_get_error ()));
bfd_close (last);
bfd_close (abfd);
return NULL;
}
It looks like the only way to get this to work within the regular solib
framework would be to actually teach solib.c itself about this form of
archive members.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2007-06-19 19:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-18 15:08 Daniel Jacobowitz
2007-06-18 21:07 ` Christopher Faylor
2007-06-18 21:12 ` Daniel Jacobowitz
2007-06-18 21:54 ` Pedro Alves
2007-06-18 23:28 ` Christopher Faylor
2007-06-19 19:06 ` Ulrich Weigand [this message]
2007-06-19 19:19 ` Daniel Jacobowitz
2007-06-19 20:00 ` Ulrich Weigand
2007-06-19 20:12 ` Daniel Jacobowitz
2007-06-19 22:43 ` Pedro Alves
2007-06-19 23:34 ` Daniel Jacobowitz
2007-06-19 23:58 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200706191905.l5JJ5pcj014266@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro_alves@portugalmail.pt \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox