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: binutils-2.18 and U-Boot


Yah, that fix will fix part of the problem.  The macro
ELF_IS_SECTION_IN_SEGMENT has 3 parts to it, and parts 2
and 3 are susceptible to a wrap condition.  He fixed the
wrap in part3, but it also needs to be fixed in part2.
This patch should fix the wrap in part2.  Look good?

diff -Naur a/include/elf/internal.h b/include/elf/internal.h
--- a/include/elf/internal.h 2007-11-28 05:53:05.000000000 -0800
+++ b/include/elf/internal.h 2007-12-11 16:37:43.906250000 -0800
@@ -284,8 +284,8 @@
offset within the segment. */ \
&& (sec_hdr->sh_type == SHT_NOBITS \
|| ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \
- && (sec_hdr->sh_offset + ELF_SECTION_SIZE(sec_hdr, segment) \
- <= segment->p_offset + segment->p_filesz))) \
+ && (sec_hdr->sh_offset - segment->p_offset \
+ + ELF_SECTION_SIZE(sec_hdr, segment) <= segment->p_filesz))) \
/* SHF_ALLOC sections must have VMAs within the segment. Be \
careful about segments right at the end of memory. */ \
&& ((sec_hdr->sh_flags & SHF_ALLOC) == 0 \


By the way, the mainline CVS does not build. Is that common?


-----Original Message----- From: Alan Modra <amodra@bigpond.net.au> To: raptorbrino@aim.com Cc: binutils@sourceware.org Sent: Tue, 11 Dec 2007 3:53 pm Subject: Re: binutils-2.18 and U-Boot


I think this problem has already been fixed in mainline CVS binutils. See http://sourceware.org/ml/binutils/2007-11/msg00235.html Please verify and close 5205 if so.

--
Alan Modra
Australia Development Lab, IBM






________________________________________________________________________
More new features than ever. Check out the new AIM(R) Mail ! - http://webmail.aim.com



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