diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-05-03 18:04:02 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-05-03 18:04:02 +0000 |
commit | 30510692eb858ac9c7262a187d78337a7503d196 (patch) | |
tree | 759693eef9f1f7ae548dc42d4835b6b914d4669a /gdb/exec.c | |
parent | 7284e1bed8f26d644523bcf82dbfc03ff594ff36 (diff) | |
download | gdb-30510692eb858ac9c7262a187d78337a7503d196.zip gdb-30510692eb858ac9c7262a187d78337a7503d196.tar.gz gdb-30510692eb858ac9c7262a187d78337a7503d196.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r-- | gdb/exec.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -636,9 +636,8 @@ set_section_command (char *args, int from_tty) error (_("Section %s not found"), secprint); } -/* If we can find a section in FILENAME with BFD index INDEX, and the - user has not assigned an address to it yet (via "set section"), adjust it - to ADDRESS. */ +/* If we can find a section in FILENAME with BFD index INDEX, adjust + it to ADDRESS. */ void exec_set_section_address (const char *filename, int index, CORE_ADDR address) @@ -648,11 +647,10 @@ exec_set_section_address (const char *filename, int index, CORE_ADDR address) for (p = exec_ops.to_sections; p < exec_ops.to_sections_end; p++) { if (strcmp (filename, p->bfd->filename) == 0 - && index == p->the_bfd_section->index - && p->addr == 0) + && index == p->the_bfd_section->index) { + p->endaddr += address - p->addr; p->addr = address; - p->endaddr += address; } } } |