This is the mail archive of the binutils@sourceware.org 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: PATCH: segfault in bfd with large static binary


On Fri, Feb 03, 2006 at 12:45:43PM +0000, Nick Clifton wrote:
> Hi H. J.
> 
> >elf.c has
> >
> >#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
> >  ((((segment->p_paddr \
> >      ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
> >      : IS_CONTAINED_BY_VMA (section, segment)) \
> >
> >p_paddr is unspecified for ELF.
> 
> Umm, are you sure ?  In the "Tool Interface Standard (TIS) Executable 
> and Linking Format (ELF) Specification Version 1.2" in section 2.2 there is:
> 
>   p_paddr   On systems for which physical addressing is relevant,
>             this member is reserved for the segment's physical
>             address. This member requires operating system specific
>             information, which is described in the appendix at the
>             end of Book III.
> 
> 
> >BYW, I don't quite understand why we have IS_CONTAINED_BY_LMA at all.
> 
> Because ELF does support LMAs as well as VMAs and so we need to be sure 
> that if we are creating a segment for a target which uses LMAs that the 
> sections in that segment are grouped by LMA and not VMA.
> 

From:

http://www.caldera.com/developers/gabi/latest/ch5.pheader.html

p_paddr
    On systems for which physical addressing is relevant, this member
    is reserved for the segment's physical address. Because System V
    ignores physical addressing for application programs, this member
    has unspecified contents for executable files and shared objects.

We should never check it for System V based systems.


H.J.


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