This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: i386-pc-nto-qnx patch


Hi.  I haven't yet heard back specifically regarding 
IS_CONTAINED_BY_FILEPOS, but here is an overview I 
sent Nick Clifton on why we need the changes made.  
Hopefully it will help with your analysis.

I'll let you know when I get a response on the FILEPOS
stuff.

Thanks again. 

Regards,
GP

	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 function _bfd_elf_copy_private_section_data() 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 function
	worked for PT_LOAD and PT_NOTE segments, and for non
	PT_LOAD segments containing at least one allocated
	section.  The PT_SEGREL has no such sections.


> 
> Hi, Alan.  Thanks for the reply.  I will find out from the author of 
> that portion and get back to you ASAP.
> 
> Cheers.
> GP
> 
> > 
> > On Thu, May 09, 2002 at 11:20:05AM -0400, Graeme Peterson wrote:
> > > I've seen a lot of talk about merging patches, and was wondering
> > > if anyone has had time to look at the i386-pc-nto-qnx patch I
> > > submitted.  
> > 
> > I've looked at it a couple of times, thought "why is he doing that?"
> > and put it aside until I could analyse your code a little deeper.
> > 
> > So, why is IS_CONTAINED_BY_FILEPOS necessary?  Just because
> > _bfd_elf_make_section_from_shdr isn't setting up lma correctly for
> > you?   Seems to me the right solution is some tweakery to
> > _bfd_elf_make_section_from_shdr.  You'll probably want this anyway
> > as other parts of bfd look at the section lma.
> > 
> > -- 
> > Alan Modra
> > IBM OzLabs - Linux Technology Centre
> > 
> 
> 


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