diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-01-09 22:43:09 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-01-09 22:43:09 +0000 |
commit | 818f79f66bf25893345147c0a573ac855fcc9cf3 (patch) | |
tree | 894b42d354670ae0e2105d349274d25d1c2bc980 /gdb/symtab.c | |
parent | f7a6bb70398a545baf43a6c3ef867b05844d9396 (diff) | |
download | binutils-gdb-818f79f66bf25893345147c0a573ac855fcc9cf3.tar.gz |
2007-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* symtab.c (matching_bfd_sections): Fix VMA matching for
prelinked objects.
* gdb.base/relativedebug.c, gdb.base/relativedebug.exp: New files.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 1fc435ec443..4a5b1e2fd78 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -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 |