From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10614 invoked by alias); 8 Mar 2010 08:37:42 -0000 Received: (qmail 10600 invoked by uid 22791); 8 Mar 2010 08:37:41 -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 08:37:37 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o288bEW5028608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Mar 2010 03:37:14 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o288bCmC006036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Mar 2010 03:37:14 -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 o288bBAX010619; Mon, 8 Mar 2010 09:37:11 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o288bBmT010618; Mon, 8 Mar 2010 09:37:11 +0100 Date: Mon, 08 Mar 2010 08:37: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: <20100308083711.GA10392@host0.dyn.jankratochvil.net> References: <20100213224929.GB27252@host0.dyn.jankratochvil.net> <20100228231418.GA26404@host0.dyn.jankratochvil.net> <20100308072317.GE3081@adacore.com> <20100308075631.GA8106@host0.dyn.jankratochvil.net> <20100308081731.GH3081@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100308081731.GH3081@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/msg00301.txt.bz2 Hi Joel, checked-in. (Not checked-in for 7.1 as it is both a minor issue and also rather a distro integration issue.) Thanks, Jan http://sourceware.org/ml/gdb-cvs/2010-03/msg00066.html --- src/gdb/ChangeLog 2010/03/08 07:45:49 1.11442 +++ src/gdb/ChangeLog 2010/03/08 08:32:49 1.11443 @@ -1,3 +1,8 @@ +2010-03-08 Jan Kratochvil + + * symfile.c (addr_info_make_relative): New variable sect_name, use it. + Do not warn on ".gnu.liblist" and ".gnu.conflict". + 2010-03-08 Joel Brobecker Memory error when reading wrong core file. --- src/gdb/symfile.c 2010/03/05 19:32:44 1.275 +++ src/gdb/symfile.c 2010/03/08 08:32:49 1.276 @@ -592,7 +592,8 @@ for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) { - asection *sect = bfd_get_section_by_name (abfd, addrs->other[i].name); + const char *sect_name = addrs->other[i].name; + asection *sect = bfd_get_section_by_name (abfd, sect_name); if (sect) { @@ -609,8 +610,22 @@ } else { - warning (_("section %s not found in %s"), addrs->other[i].name, - bfd_get_filename (abfd)); + /* 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. */ + + 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)); + addrs->other[i].addr = 0; /* SECTINDEX is invalid if ADDR is zero. */