aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:01:25 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:01:25 +0000
commit51bee8e9b74abe4f87f96d3ec97e98d34426aae7 (patch)
tree5fba55e3ff29a4b38494053a71ac473c4fbead03 /gdb/solib-svr4.c
parentb8040f198caee93044ccfc5aacaa0c3244057b0a (diff)
downloadgdb-51bee8e9b74abe4f87f96d3ec97e98d34426aae7.zip
gdb-51bee8e9b74abe4f87f96d3ec97e98d34426aae7.tar.gz
gdb-51bee8e9b74abe4f87f96d3ec97e98d34426aae7.tar.bz2
gdb/
Support PIEs with no symfile_objfile. * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point. * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block. gdb/testsuite/ Support PIEs with no symfile_objfile. * gdb.base/break-interp.exp: New argument at the test_ld calls. (test_ld): New parameter trynosym. (test_ld <$trynosym>): New block.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 3ad067a..a2feabd 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1649,6 +1649,15 @@ svr4_relocate_main_executable (void)
objfile_relocate (symfile_objfile, new_offsets);
}
+ else if (exec_bfd)
+ {
+ asection *asect;
+
+ for (asect = exec_bfd->sections; asect != NULL; asect = asect->next)
+ exec_set_section_address (bfd_get_filename (exec_bfd), asect->index,
+ (bfd_section_vma (exec_bfd, asect)
+ + displacement));
+ }
}
/*