From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19578 invoked by alias); 28 Aug 2010 01:01:33 -0000 Received: (qmail 19419 invoked by uid 22791); 28 Aug 2010 01:01:32 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_05,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 Aug 2010 01:01:28 +0000 Received: by vws16 with SMTP id 16so4371722vws.0 for ; Fri, 27 Aug 2010 18:01:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.125.88 with SMTP id x24mr975237vcr.205.1282957286355; Fri, 27 Aug 2010 18:01:26 -0700 (PDT) Received: by 10.220.78.193 with HTTP; Fri, 27 Aug 2010 18:01:25 -0700 (PDT) In-Reply-To: <20100422015303.GK3510@bubble.grove.modra.org> References: <4D60B0700D1DB54A8C0C6E9BE69163700E67DFD1@EXCHANGEVS.IceraSemi.local> <20100421082441.GG3510@bubble.grove.modra.org> <4D60B0700D1DB54A8C0C6E9BE69163700E7815C7@EXCHANGEVS.IceraSemi.local> <20100422011106.GI3510@bubble.grove.modra.org> <20100422015303.GK3510@bubble.grove.modra.org> Date: Sat, 28 Aug 2010 01:02:00 -0000 Message-ID: Subject: Re: VMA section overlap warnings for overlays From: "H.J. Lu" To: David Stubbs , binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00354.txt.bz2 On Wed, Apr 21, 2010 at 6:53 PM, Alan Modra wrote: > On Thu, Apr 22, 2010 at 10:41:06AM +0930, Alan Modra wrote: >> Now we have a problem. =A0If we put .overlay1 in imem at p_offset+1 then >> the execution model lma (calculated from p_paddr+p_offset+1) for >> .overlay1 will be correct, but the vma (from p_vaddr+p_offset+1 >> ie. 0x2001) will be wrong. =A0Of course, with multiple overlays packed >> into one header you can't possibly get the execution model vma correct >> for all the overlays, so you probably don't care. =A0However, the >> ELF_IS_SECTION_IN_SEGMENT_FILE test in >> elf.c:assign_file_positions_for_load_sections fails, which is why you >> get a linker error. >> >> Conversely, putting .overlay1 at p_offset+0x2000 will give the correct >> vma but the wrong lma, and of course insert a whole lot of padding. >> This is what Jan's patch did, and is quite wrong for overlays.. > > Committed. =A0I didn't see any occurrence of the problem Jan originally > reported in http://sourceware.org/ml/binutils/2008-05/msg00235.html on > i386 or powerpc using recent compilers so perhaps some other change > cured it. > > bfd/ > =A0 =A0 =A0 =A0* elf.c (assign_file_positions_for_load_sections): Revert = 2008-05-29 > =A0 =A0 =A0 =A0change. =A0Tidy. =A0Don't error on sections not allocated = in segment. > ld/testsuite/ > =A0 =A0 =A0 =A0* ld-elf/extract-symbol-1sec.d: Update lma. > =A0 =A0 =A0 =A0* ld-i386/alloc.d: Expect a warning, not an error. > This patch caused: http://www.sourceware.org/bugzilla/show_bug.cgi?id=3D11953 --=20 H.J.