Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix false warning: section .gnu.liblist not found in   ... [rediffed]
Date: Mon, 08 Mar 2010 08:37:00 -0000	[thread overview]
Message-ID: <20100308083711.GA10392@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20100308081731.GH3081@adacore.com>

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  <jan.kratochvil@redhat.com>
+
+	* 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  <brobecker@adacore.com>
 
 	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.  */


      reply	other threads:[~2010-03-08  8:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13 22:49 [patch] Fix false warning: section .gnu.liblist not found in Jan Kratochvil
2010-02-28 23:14 ` [patch] Fix false warning: section .gnu.liblist not found in ... [rediffed] Jan Kratochvil
2010-03-08  7:23   ` Joel Brobecker
2010-03-08  7:57     ` Jan Kratochvil
2010-03-08  8:17       ` Joel Brobecker
2010-03-08  8:37         ` Jan Kratochvil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100308083711.GA10392@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox