bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Submission of diff file supporting i386 QNX6.


From: Graeme Peterson
Subject: Submission of diff file supporting i386 QNX6.
Date: Thu, 17 Jan 2002 17:32:55 -0500 (EST)

Hi.

I have a diff file of some mods made to the binutils-2.11.2 source
that support ntox86 (i386-qnx-nto).

I hope the format is agreeable.  Please let me know.  The change I
am most concerned with is the one in bfd/elf.c.  The developer who
made the changes to elf.c explains our need as follows:

" The QNX linker issues a special class of relocations called segment
  relocations (SEGREL). The problem is that GNU BFD removes these sections.
  For example, if you strip the QNX6 kernel (procnto) or objcopy it, it is 
  no longer usable, because the linker used in building boot images
  (ldrel) needs segment relocations.

  We need to preserve these sections and segments with proper offset and size.
  
  The bfd_copy_private_bfd_data() for ELF object files is located in elf.c and
  its name is _bfd_elf_copy_private_section_data(). This function calls 
  copy_private_bfd_data() only for ALLOCATED sections.  copy_private_bfd_data() 
  creates internal structures for segments composed of sections (mapping output 
  sections to segments) but only for ALLOCATED sections. For these reasons I 
  redesigned these functions. This structure is a key structure for
  assign_file_positions_for_segments(), which calculates correct segment offset
  and size and also offset of sections. This function worked for PT_LOAD and 
PT_NOTE
  segments, and for non PT_LOAD segments containing at least one allocated 
section. 
 
  PT_SEGREL has no such sections."

I hope the explanation is clear and complete.

I am hoping to roll these changes into the GNU head branch.  GCC and GDB
support for ntox86 are pending.

Let me know if there is anything else I can do to help make this happen.
The diff and two new files are attached.

Regards,
GP

Graeme Peterson
QNX Tools Group
address@hidden
1-613-591-0931 ext 9237

Attachment: i386nto.sh
Description: ASCII text

Attachment: qnxelf32.em
Description: ASCII C program text

Attachment: patch.txt
Description: 'diff' output text


reply via email to

[Prev in Thread] Current Thread [Next in Thread]