* Makefile.in (objfiles.o): Update.
* exec.c (exec_set_section_address): Support p->addr != 0. * objfiles.c (objfile_relocate): Update exec_ops section addresses. * symfile.c (place_section): Move exec_set_section_address call... (default_symfile_offsets): ...to here.
This commit is contained in:
parent
7284e1bed8
commit
30510692eb
5 changed files with 28 additions and 9 deletions
|
@ -49,6 +49,7 @@
|
|||
#include "source.h"
|
||||
#include "addrmap.h"
|
||||
#include "arch-utils.h"
|
||||
#include "exec.h"
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
|
@ -532,6 +533,7 @@ free_all_objfiles (void)
|
|||
void
|
||||
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
|
||||
{
|
||||
struct obj_section *s;
|
||||
struct section_offsets *delta =
|
||||
((struct section_offsets *)
|
||||
alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)));
|
||||
|
@ -683,6 +685,15 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
|
|||
}
|
||||
}
|
||||
|
||||
/* Update the table in exec_ops, used to read memory. */
|
||||
ALL_OBJFILE_OSECTIONS (objfile, s)
|
||||
{
|
||||
int idx = s->the_bfd_section->index;
|
||||
|
||||
exec_set_section_address (bfd_get_filename (objfile->obfd), idx,
|
||||
s->addr);
|
||||
}
|
||||
|
||||
/* Relocate breakpoints as necessary, after things are relocated. */
|
||||
breakpoint_re_set ();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue