]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/symtab.c
2007-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
[thirdparty/binutils-gdb.git] / gdb / symtab.c
index 1fc435ec443fabf4b8fa8fec4ab21cd0df1abb70..4a5b1e2fd78c2d44e1b7c77fb9913b0cd2db165c 100644 (file)
@@ -739,8 +739,11 @@ matching_bfd_sections (asection *first, asection *second)
   if (bfd_get_section_size (first) != bfd_get_section_size (second))
     return 0;
 
+  /* In-memory addresses may start at a different offset, relativize them.  */
   if (bfd_get_section_vma (first->owner, first)
-      != bfd_get_section_vma (second->owner, second))
+      - bfd_get_start_address (first->owner)
+      != bfd_get_section_vma (second->owner, second)
+        - bfd_get_start_address (second->owner))
     return 0;
 
   if (bfd_get_section_name (first->owner, first) == NULL