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


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.


H.J.
----
2006-02-01  H.J. Lu  <hongjiu.lu@intel.com>

* elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't check lma.

Not approved.


Cheers
  Nick


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