summaryrefslogtreecommitdiff
path: root/gdb/solib-target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-target.c')
-rw-r--r--gdb/solib-target.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index 570827687fd..0b6b2d2ae8f 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -456,8 +456,9 @@ Could not relocate shared library \"%s\": bad offsets"), so->so_name);
}
}
- offset = so->lm_info->offsets->offsets[gdb_bfd_section_index (sec->bfd,
- sec->the_bfd_section)];
+ offset = so->lm_info->offsets->offsets[gdb_bfd_section_index
+ (sec->the_bfd_section->owner,
+ sec->the_bfd_section)];
sec->addr += offset;
sec->endaddr += offset;
}