From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17795 invoked by alias); 25 Feb 2011 16:34:47 -0000 Received: (qmail 17546 invoked by uid 22791); 25 Feb 2011 16:34:45 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_BJ,TW_CP,TW_JC X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Feb 2011 16:34:39 +0000 Received: by qwd7 with SMTP id 7so1789245qwd.0 for ; Fri, 25 Feb 2011 08:34:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.28.210 with SMTP id n18mr2227807qac.191.1298651677289; Fri, 25 Feb 2011 08:34:37 -0800 (PST) Received: by 10.224.61.18 with HTTP; Fri, 25 Feb 2011 08:34:37 -0800 (PST) In-Reply-To: References: <20100715141753.GI31087@bubble.grove.modra.org> <20100716093630.GN31087@bubble.grove.modra.org> <20100720054451.GF19525@bubble.grove.modra.org> <20100720141031.GI19525@bubble.grove.modra.org> <20110225074917.GB5959@bubble.grove.modra.org> Date: Fri, 25 Feb 2011 16:34:00 -0000 Message-ID: Subject: Re: VMA section overlap warnings for overlays From: "H.J. Lu" To: Andreas Schwab Cc: David Stubbs , binutils@sourceware.org, Alan Modra 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: 2011-02/txt/msg00314.txt.bz2 On Fri, Feb 25, 2011 at 8:22 AM, Andreas Schwab wrote: > "H.J. Lu" writes: > >> diff --git a/ld/testsuite/ld-elf/dynamic1.d b/ld/testsuite/ld-elf/dynami= c1.d >> new file mode 100644 >> index 0000000..6a8ba55 >> --- /dev/null >> +++ b/ld/testsuite/ld-elf/dynamic1.d >> @@ -0,0 +1,10 @@ >> +#ld: -shared -T dynamic1.ld >> +#readelf: -l --wide >> +#target: *-*-linux* *-*-gnu* >> + >> +#... >> + Section to Segment mapping: >> + =A0Segment Sections... >> +#... >> + =A0 0[1-9] =A0 =A0 .dynamic[ =A0 =A0 =A0]* >> +#pass > > I don't see how that tests anything, this bug is about objcopy. > Both readelf and objcpy use ELF_SECTION_IN_SEGMENT_1. Before the fix: readelf -l x.so Elf file type is DYN (Shared object file) Entry point 0xb0 There are 2 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x00000000000001b0 0x00000000000001b0 RW 200000 DYNAMIC 0x0000000000000100 0x0000000000000100 0x0000000000000100 0x00000000000000b0 0x00000000000000b0 RW 8 Section to Segment mapping: Segment Sections... 00 .dynsym .dynstr .hash .data1 .dynamic 01 .data1 .dynamic ^^^^^^^ That is equivalent to "The first section in the PT_DYNAMIC segment is not the .dynamic section". --=20 H.J.