From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30136 invoked by alias); 1 Apr 2014 13:46:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 30102 invoked by uid 89); 1 Apr 2014 13:46:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Apr 2014 13:46:45 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s31DkfCC007667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 1 Apr 2014 09:46:42 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s31Dkd7u002064; Tue, 1 Apr 2014 09:46:40 -0400 Message-ID: <533AC33E.8030700@redhat.com> Date: Tue, 01 Apr 2014 13:46:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: "Metzger, Markus T" , Mark Wielaard , Cary Coutant , Doug Evans , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: vdso handling References: <5321C8FA.40708@gmail.com> <5321CE1A.20509@redhat.com> <20140313235347.GD3384@bubble.grove.modra.org> <20140318230939.GA9145@bubble.grove.modra.org> <5329879C.6070805@redhat.com> <20140320013305.GA13347@bubble.grove.modra.org> <532C5F60.80700@redhat.com> <20140328061321.GU18201@bubble.grove.modra.org> <53357B30.6040006@redhat.com> <20140328230037.GW18201@bubble.grove.modra.org> In-Reply-To: <20140328230037.GW18201@bubble.grove.modra.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-04/txt/msg00009.txt.bz2 On 03/28/2014 11:00 PM, Alan Modra wrote: > I believe the intent of rounding to a page was to pick up the file > and program headers at the start of a file and section headers at the > end, so let's do just that. On top of my last patch: Agreed. This works for me. Thanks! > - if (i_phdrs[i].p_align > 1) > + /* Extend the beginning of the first pt_load to cover file > + header and program headers. */ > + if (first_phdr == &i_phdrs[i]) Minor nit: Perhaps the comment could say "first pt_load if it covers offset 0"? The computation below confused me a little until I scrolled up and realized that first_phdr is only set if the first segment covers offset 0, not whatever the first segment is. (I'd even consider renaming it to zero_phdr or zero_offset_phdr, but with the comment I'd already be super happy). On the GDB patch, sorry for not noticing earlier, but: > +static int > +find_vdso_size (CORE_ADDR vaddr, unsigned long size, > + int read ATTRIBUTE_UNUSED, int write ATTRIBUTE_UNUSED, > + int exec ATTRIBUTE_UNUSED, int modified ATTRIBUTE_UNUSED, > + void *data) > +{ Please don't use ATTRIBUTE_UNUSED under gdb/, it'd be flagged by the ARI as a regression: gdb/contrib/gdb_ari.sh: BEGIN { doc["ATTRIBUTE_UNUSED"] = "\ Do not use ATTRIBUTE_UNUSED, do not bother (GDB is compiled with -Werror and, \ consequently, is not able to tolerate false warnings. Since -Wunused-param \ produces such warnings, neither that warning flag nor ATTRIBUTE_UNUSED \ are used by GDB" category["ATTRIBUTE_UNUSED"] = ari_regression } /(^|[^_[:alnum:]])ATTRIBUTE_UNUSED([^_[:alnum:]]|$)/ { fail("ATTRIBUTE_UNUSED") } -- Pedro Alves