summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 3419c6dfa2d..bee81a695b6 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -27,6 +27,7 @@
#include "defs.h"
#include "bfd.h" /* Binary File Description */
+#include "exec.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
@@ -652,6 +653,11 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
s->addr += ANOFFSET (delta, idx);
s->endaddr += ANOFFSET (delta, idx);
+
+ /* FIXME: The exec file uses a completely different table from
+ any objfile, unfortunately. A nice improvement would
+ be to unify those. */
+ exec_set_section_address (bfd_get_filename (abfd), idx, s->addr);
}
}