From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10050 invoked by alias); 8 Mar 2010 07:57:04 -0000 Received: (qmail 10041 invoked by uid 22791); 8 Mar 2010 07:57:03 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Mar 2010 07:56:59 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o287uZw1012408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Mar 2010 02:56:35 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o287uXD3010915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Mar 2010 02:56:35 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o287uWel008864; Mon, 8 Mar 2010 08:56:32 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o287uWO1008863; Mon, 8 Mar 2010 08:56:32 +0100 Date: Mon, 08 Mar 2010 07:57:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix false warning: section .gnu.liblist not found in ... [rediffed] Message-ID: <20100308075631.GA8106@host0.dyn.jankratochvil.net> References: <20100213224929.GB27252@host0.dyn.jankratochvil.net> <20100228231418.GA26404@host0.dyn.jankratochvil.net> <20100308072317.GE3081@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100308072317.GE3081@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes 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 X-SW-Source: 2010-03/txt/msg00299.txt.bz2 On Mon, 08 Mar 2010 08:23:17 +0100, Joel Brobecker wrote: > > 2010-03-01 Jan Kratochvil > > > > * symfile.c (addr_info_make_relative): New variable sect_name, use it. > > Do not warn on ".gnu.liblist" and ".gnu.conflict". > > This looks reasonable. We can go with that at least for now, > but I am wondering whether we might want to consider using a complaint > instead if more sections like these keep popping up. I have checked prelink sources and IIUC there are no other sections than ".gnu.liblist" and ".gnu.conflict" with this behavior/problem. I do not agree with this one sentence but I believe it is offtopic for this patch/thread. > I have a small request: > > > + /* These two sections are intentionally loaded into memory from > > + the DYNAMIC segment and so they have both SEC_ALLOC and SEC_LOAD > > + set in the main executable (not in the library files). They > > + are not present in the separate debug info file, though. */ > > + > > + if (!(strcmp (sect_name, ".gnu.liblist") == 0 > > + || strcmp (sect_name, ".gnu.conflict") == 0)) > > + warning (_("section %s not found in %s"), sect_name, > > + bfd_get_filename (abfd)); > > + > > I was a little confused at first by the comment, because it immediately > mentioned "these two sections" without giving an idea of what these > sections were. May I suggest maybe something more detailed like so? > > /* This section does not exist in ABFD, which is normally > unexpected and we want to issue a warning. > > However, the ELF prelinker does create a couple of sections > (".gnu.liblist" and ".gnu.conflict") which are marked as > loadable (they are loaded in memory from the DYNAMIC segment) > and yet are not present in separate debug info files. This > is fine, and should not cause a warning. */ OK, thanks. Just the main executable vs. shared library files difference was omitted there. This difference was IIRC the main cost while investigating this problem therefore I would like to keep the note there: /* This section does not exist in ABFD, which is normally unexpected and we want to issue a warning. However, the ELF prelinker does create a couple of sections (".gnu.liblist" and ".gnu.conflict") which are marked in the main executable as loadable (they are loaded in memory from the DYNAMIC segment) and yet are not present in separate debug info files. This is fine, and should not cause a warning. Shared libraries contain just the section ".gnu.liblist" but it is not marked as loadable there. */ As the comment is already being discusses is approved even this variant? Thanks for the review, Jan