summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 2c525f61f99..39f5623749d 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -614,7 +614,8 @@ void
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct section_offsets *delta =
- (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)));
{
int i;