This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: segfault in bfd with large static binary
- From: Nick Clifton <nickc at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Mike Frysinger <vapier at gentoo dot org>, binutils at sourceware dot org
- Date: Fri, 03 Feb 2006 12:45:43 +0000
- Subject: Re: PATCH: segfault in bfd with large static binary
- References: <200601312314.51054.vapier@gentoo.org> <20060201183908.GA28877@lucon.org>
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