This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: For example only, updated Windows DLL support and gdbserver DLL support


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]