Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: For example only, updated Windows DLL support and gdbserver   DLL         support
Date: Tue, 19 Jun 2007 22:43:00 -0000	[thread overview]
Message-ID: <46785C09.8070500@portugalmail.pt> (raw)
In-Reply-To: <20070619201223.GA29049@caradoc.them.org>

Daniel Jacobowitz wrote:
> Ulrich Weigand wrote:
>>> I'm not sure how much trouble you'll have reporting the correct
>>> relocations for an object file.  Do you get something based on
>>> sections, or do AIX object files have a fixed number of segments?
>> XCOFF seems to be a bit limited in that respect, I understand there
>> is just "Text" and "Data".  The AIX ldinfo structure provides:
> 
> Perfect.  Then GDB's xcoff reader can report that the object file has
> two "segments", one text and one data.
> 

Are .text and .data really loaded as one segment like on windows,
or can AIX load them separately at arbitrary addresses irrespective
of the order that they have on the file?  The bfd view of the order
of the sections may be different from what the target would report.
One might need to take that into account.

Eg:

On file:
sect1, .text 0x000001000 (seg0)
sect2, .data 0x000100000 (seg1)

On load:
.text 0x010000000 (seg0)
.data 0x001100000 (seg1)

report .text as seg0 and .data as seg1,

relocate 0x000001000 to 0x010000000
relocate 0x000100000 to 0x001100000

OK.

---

Eg2:

On file:
sect1, .data 0x000002000 (seg0)
sect2, .text 0x000200000 (seg1)

On load:
.text 0x020000000 (seg0)
.data 0x002200000 (seg1)

report .text as seg0 and .data as seg1, (bad)

relocate 0x000002000 to 0x020000000 (bad)
relocate 0x000200000 to 0x002200000 (bad)

NOK.

Cheers,
Pedro Alves


  reply	other threads:[~2007-06-19 22:43 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
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 [this message]
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=46785C09.8070500@portugalmail.pt \
    --to=pedro_alves@portugalmail.pt \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /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