aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-03-08 08:32:49 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-03-08 08:32:49 +0000
commitb0fcb67f7dba1fb2a54a1b4692efd84dd770d2ce (patch)
tree6a7d31bfb82a5db580ab76cd3b46efbb82688c98 /gdb/symfile.c
parent08597104eb26d23340f42ccd610ce6d24015e501 (diff)
downloadgdb-b0fcb67f7dba1fb2a54a1b4692efd84dd770d2ce.zip
gdb-b0fcb67f7dba1fb2a54a1b4692efd84dd770d2ce.tar.gz
gdb-b0fcb67f7dba1fb2a54a1b4692efd84dd770d2ce.tar.bz2
gdb/
* symfile.c (addr_info_make_relative): New variable sect_name, use it. Do not warn on ".gnu.liblist" and ".gnu.conflict".
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index dbb396c..aabb945 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -592,7 +592,8 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
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 @@ addr_info_make_relative (struct section_addr_info *addrs, bfd *abfd)
}
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. */