gdb/gdb-false-warning-gnu.libli...

100 lines
3.9 KiB
Diff

http://sourceware.org/ml/gdb-cvs/2010-03/msg00066.html
16558457783d71e2856ff2b9ceaa83199d2d9811
### 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. */
http://sourceware.org/ml/gdb-cvs/2010-03/msg00138.html
http://sourceware.org/ml/gdb-patches/2010-03/msg00535.html
cc3e71651e2fd0168a2d3dd4efc2d3e15fd508dd
### src/gdb/ChangeLog 2010/03/15 03:48:46 1.11479
### src/gdb/ChangeLog 2010/03/15 09:31:30 1.11480
## -1,3 +1,8 @@
+2010-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * symfile.c (addr_info_make_relative): Ignore also missing ".dynbss"
+ and ".sdynbss". Update the comment.
+
2010-03-15 Jie Zhang <jie@codesourcery.com>
* MAINTAINERS: Update my email address.
--- src/gdb/symfile.c 2010/03/10 18:20:07 1.277
+++ src/gdb/symfile.c 2010/03/15 09:31:34 1.278
@@ -576,16 +576,19 @@
/* 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. */
+ However, the ELF prelinker does create a few sections 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. There is
+ no other way to identify them than by their name as the sections
+ created by prelink have no special flags. */
if (!(strcmp (sect_name, ".gnu.liblist") == 0
- || strcmp (sect_name, ".gnu.conflict") == 0))
+ || strcmp (sect_name, ".gnu.conflict") == 0
+ || strcmp (sect_name, ".dynbss") == 0
+ || strcmp (sect_name, ".sdynbss") == 0))
warning (_("section %s not found in %s"), sect_name,
bfd_get_filename (abfd));